railo.runtime.op
Class Decision

java.lang.Object
  extended by railo.runtime.op.Decision

public final class Decision
extends Object

Object to test if a Object is a specific type


Constructor Summary
Decision()
           
 
Method Summary
static boolean isArray(Object o)
          tests if object is a array
static boolean isBinary(Object object)
          tests if object is a binary
static boolean isBoolean(Object value)
          tests if value is a Boolean (Numbers are not acctepeted)
static boolean isBoolean(Object value, boolean alsoNumbers)
           
static boolean isBoolean(String str)
          tests if value is a Boolean
static boolean isCastableTo(short type, String strType, Object o)
           
static boolean isCastableTo(String type, Object o, boolean alsoPattern)
           
static boolean isCastableToArray(Object o)
          can this type be casted to a array
static boolean isCastableToBinary(Object object, boolean checkBase64String)
          tests if object is catable to a binary
static boolean isCastableToBoolean(Object value)
           
static boolean isCastableToDate(Object o)
           
static boolean isCastableToNumeric(Object o)
           
static boolean isCastableToString(Object o)
           
static boolean isCastableToStruct(Object o)
           
static boolean isComponent(Object object)
          tests if object is a Component
static boolean isCreditCard(Object value)
          returns if a value is a credit card
static boolean isDate(Object value, boolean alsoNumbers)
          tests if value is DateTime Object
static boolean isDate(String str, Locale locale, TimeZone tz, boolean lenient)
           
static boolean isDateAdvanced(Object value, boolean alsoNumbers)
           
static boolean isDateSimple(Object value, boolean alsoNumbers)
           
static boolean isEmail(Object value)
          returns if given object is a email
static boolean isEmpty(Object obj)
           
static boolean isEmpty(String str)
          Deprecated. use instead StringUtil.isEmpty(String)
static boolean isEmpty(String str, boolean trim)
          Deprecated. use instead StringUtil.isEmpty(String)
static boolean isEuroDate(Object value)
           
static boolean isEuroDate(String str)
           
static boolean isGUId(Object obj)
           
static boolean isGUID(Object obj)
          Deprecated. use instead isGUId(Object)
static boolean isGUIdSimple(Object obj)
           
static boolean isHex(String str)
          tests if String value is Hex Value
static boolean isInteger(Object value)
           
static boolean isInteger(Object value, boolean alsoBooleans)
           
static boolean isLeapYear(int year)
          tests if year is a leap year
static boolean isNativeArray(Object o)
          tests if object is a native java array
static boolean isNumeric(Object value)
          tests if value is Numeric
static boolean isNumeric(Object value, boolean alsoBooleans)
          tests if value is Numeric
static boolean isNumeric(String str)
          tests if String value is Numeric
static boolean isObject(Object o)
          returns if object is a cold fusion object
static boolean isPhone(Object value)
          returns if given object is a phone
static boolean isQuery(Object object)
          tests if object is a Query
static boolean isSimpleValue(Object value)
          tests if value is a simple value (Number,String,Boolean,Date,Printable)
static boolean isSimpleVariableName(Collection.Key key)
           
static boolean isSimpleVariableName(String string)
           
static boolean isSSN(Object value)
          returns if given object is a social security number (usa)
static boolean isString(Object o)
           
static boolean isStruct(Object o)
          tests if object is a struct
static boolean isURL(Object value)
          returns if given object is a URL
static boolean isUSDate(Object value)
           
static boolean isUSDate(String str)
           
static boolean isUserDefinedFunction(Object object)
          tests if object is a binary
static boolean isUUId(Object obj)
          tests if String value is UUID Value
static boolean isUUID(Object obj)
          Deprecated. use instead isUUId(Object obj)
static boolean isValid(double dbl)
          Checks if number is valid (not infinity or NaN)
static boolean isValid(String type, Object value)
           
static boolean isVariableName(Object obj)
           
static boolean isVariableName(String string)
           
static boolean isVoid(Object o)
           
static boolean isWddx(Object o)
          tests if object is a WDDX Object
static boolean isXML(Object o)
          tests if object is a XML Object
static boolean isXMLDocument(Object o)
          tests if object is a XML Document Object
static boolean isXMLElement(Object o)
          tests if object is a XML Element Object
static boolean isXMLRootElement(Object o)
          tests if object is a XML Root Element Object
static boolean isZipCode(Object value)
          returns if given object is a zip code
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Decision

public Decision()
Method Detail

isSimpleValue

public static boolean isSimpleValue(Object value)
tests if value is a simple value (Number,String,Boolean,Date,Printable)

Parameters:
value - value to test
Returns:
is value a simple value

isNumeric

public static boolean isNumeric(Object value)
tests if value is Numeric

Parameters:
value - value to test
Returns:
is value numeric

isCastableToNumeric

public static boolean isCastableToNumeric(Object o)

isCastableToDate

public static boolean isCastableToDate(Object o)

isNumeric

public static boolean isNumeric(Object value,
                                boolean alsoBooleans)
tests if value is Numeric

Parameters:
value - value to test
Returns:
is value numeric

isNumeric

public static boolean isNumeric(String str)
tests if String value is Numeric

Parameters:
str - value to test
Returns:
is value numeric

isInteger

public static boolean isInteger(Object value)

isInteger

public static boolean isInteger(Object value,
                                boolean alsoBooleans)

isHex

public static boolean isHex(String str)
tests if String value is Hex Value

Parameters:
str - value to test
Returns:
is value numeric

isUUID

public static boolean isUUID(Object obj)
Deprecated. use instead isUUId(Object obj)

tests if String value is UUID Value

Parameters:
str - value to test
Returns:
is value numeric

isUUId

public static boolean isUUId(Object obj)
tests if String value is UUID Value

Parameters:
str - value to test
Returns:
is value numeric

isGUID

public static boolean isGUID(Object obj)
Deprecated. use instead isGUId(Object)

Parameters:
obj -
Returns:

isGUId

public static boolean isGUId(Object obj)

isGUIdSimple

public static boolean isGUIdSimple(Object obj)

isBoolean

public static boolean isBoolean(Object value)
tests if value is a Boolean (Numbers are not acctepeted)

Parameters:
value - value to test
Returns:
is value boolean

isCastableToBoolean

public static boolean isCastableToBoolean(Object value)

isBoolean

public static boolean isBoolean(Object value,
                                boolean alsoNumbers)

isBoolean

public static boolean isBoolean(String str)
tests if value is a Boolean

Parameters:
str - value to test
Returns:
is value boolean

isDate

public static boolean isDate(Object value,
                             boolean alsoNumbers)
tests if value is DateTime Object

Parameters:
value - value to test
alsoNumbers - interpret also a number as date
Returns:
is value a DateTime Object

isDateSimple

public static boolean isDateSimple(Object value,
                                   boolean alsoNumbers)

isDateAdvanced

public static boolean isDateAdvanced(Object value,
                                     boolean alsoNumbers)

isUSDate

public static boolean isUSDate(Object value)

isUSDate

public static boolean isUSDate(String str)

isEuroDate

public static boolean isEuroDate(Object value)

isEuroDate

public static boolean isEuroDate(String str)

isCastableToStruct

public static boolean isCastableToStruct(Object o)

isStruct

public static boolean isStruct(Object o)
tests if object is a struct

Parameters:
o -
Returns:
is struct or not

isCastableToArray

public static boolean isCastableToArray(Object o)
can this type be casted to a array

Parameters:
o -
Returns:
Throws:
PageException

isArray

public static boolean isArray(Object o)
tests if object is a array

Parameters:
o -
Returns:
is array or not

isNativeArray

public static boolean isNativeArray(Object o)
tests if object is a native java array

Parameters:
o -
Returns:
is a native (java) array

isCastableToBinary

public static boolean isCastableToBinary(Object object,
                                         boolean checkBase64String)
tests if object is catable to a binary

Parameters:
object -
Returns:
boolean

isBinary

public static boolean isBinary(Object object)
tests if object is a binary

Parameters:
object -
Returns:
boolean

isComponent

public static boolean isComponent(Object object)
tests if object is a Component

Parameters:
object -
Returns:
boolean

isQuery

public static boolean isQuery(Object object)
tests if object is a Query

Parameters:
object -
Returns:
boolean

isUserDefinedFunction

public static boolean isUserDefinedFunction(Object object)
tests if object is a binary

Parameters:
object -
Returns:
boolean

isLeapYear

public static final boolean isLeapYear(int year)
tests if year is a leap year

Parameters:
year - year to check
Returns:
boolean

isWddx

public static boolean isWddx(Object o)
tests if object is a WDDX Object

Parameters:
o - Object to check
Returns:
boolean

isXML

public static boolean isXML(Object o)
tests if object is a XML Object

Parameters:
o - Object to check
Returns:
boolean

isVoid

public static boolean isVoid(Object o)

isXMLElement

public static boolean isXMLElement(Object o)
tests if object is a XML Element Object

Parameters:
o - Object to check
Returns:
boolean

isXMLDocument

public static boolean isXMLDocument(Object o)
tests if object is a XML Document Object

Parameters:
o - Object to check
Returns:
boolean

isXMLRootElement

public static boolean isXMLRootElement(Object o)
tests if object is a XML Root Element Object

Parameters:
o - Object to check
Returns:
boolean

isVariableName

public static boolean isVariableName(Object obj)
Parameters:
string -
Returns:
returns if string represent a variable name

isVariableName

public static boolean isVariableName(String string)
Parameters:
string -
Returns:
returns if string represent a variable name

isSimpleVariableName

public static boolean isSimpleVariableName(String string)
Parameters:
string -
Returns:
returns if string represent a variable name

isSimpleVariableName

public static boolean isSimpleVariableName(Collection.Key key)
Parameters:
string -
Returns:
returns if string represent a variable name

isObject

public static boolean isObject(Object o)
returns if object is a cold fusion object

Parameters:
o - Object to check
Returns:
is or not

isEmpty

public static boolean isEmpty(Object obj)
Parameters:
obj -
Returns:
return if a String is "Empty", that means NULL or String with length 0 (whitespaces will not counted)

isEmpty

public static boolean isEmpty(String str)
Deprecated. use instead StringUtil.isEmpty(String)

Parameters:
str -
Returns:
return if a String is "Empty", that means NULL or String with length 0 (whitespaces will not counted)

isEmpty

public static boolean isEmpty(String str,
                              boolean trim)
Deprecated. use instead StringUtil.isEmpty(String)

Parameters:
str -
trim -
Returns:
return if a String is "Empty", that means NULL or String with length 0 (whitespaces will not counted)

isCreditCard

public static boolean isCreditCard(Object value)
returns if a value is a credit card

Parameters:
value -
Returns:
is credit card

isEmail

public static boolean isEmail(Object value)
returns if given object is a email

Parameters:
value -
Returns:

isSSN

public static boolean isSSN(Object value)
returns if given object is a social security number (usa)

Parameters:
value -
Returns:

isPhone

public static boolean isPhone(Object value)
returns if given object is a phone

Parameters:
value -
Returns:

isURL

public static boolean isURL(Object value)
returns if given object is a URL

Parameters:
value -
Returns:

isZipCode

public static boolean isZipCode(Object value)
returns if given object is a zip code

Parameters:
value -
Returns:

isString

public static boolean isString(Object o)

isCastableToString

public static boolean isCastableToString(Object o)

isValid

public static boolean isValid(String type,
                              Object value)
                       throws ExpressionException
Throws:
ExpressionException

isCastableTo

public static boolean isCastableTo(String type,
                                   Object o,
                                   boolean alsoPattern)

isCastableTo

public static boolean isCastableTo(short type,
                                   String strType,
                                   Object o)

isDate

public static boolean isDate(String str,
                             Locale locale,
                             TimeZone tz,
                             boolean lenient)

isValid

public static boolean isValid(double dbl)
Checks if number is valid (not infinity or NaN)

Parameters:
dbl -
Returns:


Copyright © 2012 Railo