|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.millscript.tools.CastLibrary
public final class CastLibrary
Utility class to handle casting to a specific type from a plain object. All these casts support deferred objects.
Deferred| Method Summary | |
|---|---|
static Binding |
toBinding(java.lang.Object x)
Casts the supplied Object to a binding for a regular expression match. |
static java.lang.Boolean |
toBoolean(java.lang.Object x)
Casts the supplied Object to a Boolean. |
static java.util.Calendar |
toCalendar(java.lang.Object x)
Casts the supplied Object to a Calendar. |
static java.lang.Character |
toCharacter(java.lang.Object x)
Casts the supplied Object to a Character. |
static DatabaseSource |
toDatabaseSource(java.lang.Object x)
Casts the supplied Object to a DatabaseSource. |
static Fragment |
toFragment(java.lang.Object x)
Casts the supplied Object to a Fragment. |
static Function |
toFunction(java.lang.Object x)
Casts the supplied Object to a Function. |
static org.millscript.commons.util.IList |
toIList(java.lang.Object x)
Casts the supplied Object to a List. |
static Image |
toImage(java.lang.Object x)
Casts the supplied Object to an Image. |
static org.millscript.commons.util.IMap |
toIMap(java.lang.Object x)
Casts the supplied Object to a Map. |
static int |
toInt(java.lang.Object x)
Casts the supplied Object to an int value. |
static java.lang.Integer |
toInteger(java.lang.Object x)
Casts the supplied Object to an Integer. |
static java.lang.Object[] |
toObjectArray(java.lang.Object x)
Casts the supplied Object to an Object array. |
static java.util.regex.Pattern |
toPattern(java.lang.Object x)
Casts the supplied Object to an traditional regular expression Pattern. |
static SpiceClass |
toSpiceClass(java.lang.Object x)
Casts the supplied Object to a Spice Class. |
static SpiceClassConstructorFunction |
toSpiceClassConstructorFunction(java.lang.Object x)
Casts the supplied Object to a SpiceClassConstructorFunction. |
static SpiceObject |
toSpiceObject(java.lang.Object x)
Casts the supplied Object to a Spice Object. |
static java.lang.String |
toString(java.lang.Object x)
Casts the supplied Object to a String. |
static Page |
toURL(java.lang.Object x)
Casts the supplied Object to a URL. |
static org.millscript.commons.vfs.VEntry |
toVEntry(java.lang.Object x)
Casts the supplied Object to a VEntry. |
static org.millscript.commons.vfs.VFile |
toVFile(java.lang.Object x)
Casts the supplied Object to a VFile. |
static org.millscript.commons.vfs.VFolder |
toVFolder(java.lang.Object x)
Casts the supplied Object to a VFolder. |
static XmlComment |
toXmlComment(java.lang.Object x)
Casts the supplied Object to an XmlComment. |
static XmlElement |
toXmlElement(java.lang.Object x)
Casts the supplied Object to an XmlElement. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Binding toBinding(java.lang.Object x)
x - an object to cast to a Binding
public static java.lang.Boolean toBoolean(java.lang.Object x)
x - an object to cast to a Boolean
public static java.util.Calendar toCalendar(java.lang.Object x)
x - an object to cast to an Calendar
Calendar from the top of the stackpublic static java.lang.Character toCharacter(java.lang.Object x)
x - an object to cast to an Character
Character from the top of the stackpublic static DatabaseSource toDatabaseSource(java.lang.Object x)
x - an object to cast to an DatabaseSource
DatabaseSource
from the top of the stackpublic static Fragment toFragment(java.lang.Object x)
x - an object to cast to a Fragment
Fragment cast from the specified obectpublic static Function toFunction(java.lang.Object x)
x - an object to cast to an Function
Function from
the top of the stackpublic static org.millscript.commons.util.IList toIList(java.lang.Object x)
x - an object to cast to an IList
IList cast from the specified objectpublic static Image toImage(java.lang.Object x)
x - an object to cast to an Image
Image from the top of the stackpublic static org.millscript.commons.util.IMap toIMap(java.lang.Object x)
x - an object to cast to an Map
Map cast from the specified objectpublic static int toInt(java.lang.Object x)
x - an object to converted to an int
public static java.lang.Integer toInteger(java.lang.Object x)
x - an object to cast to an Integer
Integer from the top of the stackpublic static java.lang.Object[] toObjectArray(java.lang.Object x)
x - an object to cast to an object array
public static java.util.regex.Pattern toPattern(java.lang.Object x)
x - an object to cast to a Pattern
public static SpiceClass toSpiceClass(java.lang.Object x)
x - an object to cast to an SpiceClass
SpiceClass from
the top of the stackpublic static SpiceClassConstructorFunction toSpiceClassConstructorFunction(java.lang.Object x)
x - an object to cast to an SpiceClassConstructorFunction
SpiceClassConstructorFunction from
the top of the stackpublic static SpiceObject toSpiceObject(java.lang.Object x)
x - an object to cast to an SpiceObject
SpiceObject from
the top of the stackpublic static java.lang.String toString(java.lang.Object x)
x - an object to cast to an String
String cast from the specified objectpublic static Page toURL(java.lang.Object x)
x - an object to cast to a URL
public static org.millscript.commons.vfs.VEntry toVEntry(java.lang.Object x)
x - an object to cast to a VEntry
VEntry cast from the specified obectpublic static org.millscript.commons.vfs.VFile toVFile(java.lang.Object x)
x - an object to cast to a VFile
VFile cast from the specified obectpublic static org.millscript.commons.vfs.VFolder toVFolder(java.lang.Object x)
x - an object to cast to a VFolder
VFolder cast from the specified obectpublic static XmlComment toXmlComment(java.lang.Object x)
x - an object to cast to an XmlComment
XmlComment cast from the specified objectpublic static XmlElement toXmlElement(java.lang.Object x)
x - an object to cast to an XmlElement
XmlElement cast from the specified object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||