public class KeyImpl extends Object implements Collection.Key, Castable, Comparable, Sizeable, Externalizable, WangJenkins
Modifier and Type | Method and Description |
---|---|
static Collection.Key |
_const(String key) |
Boolean |
castToBoolean(Boolean defaultValue)
cast the castable value to a boolean value
|
boolean |
castToBooleanValue()
cast the castable value to a boolean value
|
DateTime |
castToDateTime()
cast the castable value to a date time object
|
DateTime |
castToDateTime(DateTime defaultValue)
cast the castable value to a date time object
|
double |
castToDoubleValue()
cast the castable value to a double value
|
double |
castToDoubleValue(double defaultValue)
cast the castable value to a double value
|
String |
castToString()
cast the castable value to a string, other than the Method toString, this Method can throw a Exception
|
String |
castToString(String defaultValue)
cast the castable value to a string, return the default value, when the method is not castable
|
char |
charAt(int index)
return char at given position
|
int |
compareTo(boolean b) |
int |
compareTo(DateTime dt) |
int |
compareTo(double d) |
int |
compareTo(Object o) |
int |
compareTo(String str) |
boolean |
equals(Object other) |
boolean |
equalsIgnoreCase(Collection.Key other)
compare to object, ignore case of input
|
int |
getId() |
static Collection.Key |
getInstance(String key) |
String |
getLowerString()
return key as lower case String
|
String |
getString()
return key as String
|
String |
getUpperString()
return key as upper case String
|
long |
hash() |
int |
hashCode() |
static Collection.Key |
init(String key)
for dynamic loading of key objects
|
static Collection.Key |
intern(String key) |
int |
length()
Returns the length of this string.
|
char |
lowerCharAt(int index)
return lower case char a given position
|
void |
readExternal(ObjectInput in) |
long |
sizeOf()
return the size of the object
|
int |
slotForMap() |
static Array |
toArray(Collection.Key[] keys) |
static Collection.Key |
toKey(Object obj) |
static Collection.Key |
toKey(Object obj,
Collection.Key defaultValue) |
static Collection.Key[] |
toKeyArray(String[] arr) |
static String |
toList(Collection.Key[] array,
String delimiter) |
static Array |
toLowerCaseArray(Collection.Key[] keys) |
static String |
toLowerCaseList(Collection.Key[] array,
String delimiter) |
String |
toString() |
static Array |
toUpperCaseArray(Collection.Key[] keys) |
static String |
toUpperCaseList(Collection.Key[] array,
String delimiter) |
char |
upperCharAt(int index)
return upper case char a given position
|
int |
wangJenkinsHash() |
void |
writeExternal(ObjectOutput out) |
public int wangJenkinsHash()
wangJenkinsHash
in interface WangJenkins
public int slotForMap()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public static Collection.Key init(String key)
string
- public static Collection.Key _const(String key)
public static Collection.Key getInstance(String key)
public static Collection.Key intern(String key)
public char charAt(int index)
Collection.Key
charAt
in interface Collection.Key
public char lowerCharAt(int index)
Collection.Key
lowerCharAt
in interface Collection.Key
public char upperCharAt(int index)
Collection.Key
upperCharAt
in interface Collection.Key
public String getLowerString()
Collection.Key
getLowerString
in interface Collection.Key
public String getUpperString()
Collection.Key
getUpperString
in interface Collection.Key
public String getString()
Collection.Key
getString
in interface Collection.Key
public boolean equalsIgnoreCase(Collection.Key other)
Collection.Key
equalsIgnoreCase
in interface Collection.Key
public long hash()
public int getId()
getId
in interface Collection.Key
public boolean castToBooleanValue() throws PageException
Castable
castToBooleanValue
in interface Castable
PageException
public Boolean castToBoolean(Boolean defaultValue)
Castable
castToBoolean
in interface Castable
public DateTime castToDateTime() throws PageException
Castable
castToDateTime
in interface Castable
PageException
public DateTime castToDateTime(DateTime defaultValue)
Castable
castToDateTime
in interface Castable
defaultValue
- returned when it is not possible to cast to a dateTime objectpublic double castToDoubleValue() throws PageException
Castable
castToDoubleValue
in interface Castable
PageException
public double castToDoubleValue(double defaultValue)
Castable
castToDoubleValue
in interface Castable
public String castToString() throws PageException
Castable
castToString
in interface Castable
PageException
public String castToString(String defaultValue)
Castable
castToString
in interface Castable
public int compareTo(boolean b) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(DateTime dt) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(double d) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(String str) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(Object o)
compareTo
in interface Comparable
public static Array toUpperCaseArray(Collection.Key[] keys)
public static Array toLowerCaseArray(Collection.Key[] keys)
public static Array toArray(Collection.Key[] keys)
public static String toUpperCaseList(Collection.Key[] array, String delimiter)
public static String toList(Collection.Key[] array, String delimiter)
public static String toLowerCaseList(Collection.Key[] array, String delimiter)
public static Collection.Key toKey(Object obj, Collection.Key defaultValue)
public static Collection.Key toKey(Object obj) throws CasterException
CasterException
public long sizeOf()
Sizeable
public int length()
Collection.Key
length
in interface Collection.Key
public static Collection.Key[] toKeyArray(String[] arr)
Copyright © 2015 Lucee