|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.util.exi.type.BaseType org.ujac.util.exi.type.BaseNumberType org.ujac.util.exi.type.IntegerType
public class IntegerType
Name: IntegerType
Description: An expression type handler for int values.
Nested Class Summary | |
---|---|
class |
IntegerType.AbsOperation
The 'abs' operation for Integers. |
class |
IntegerType.AddOperation
The 'add' operation for Integers. |
class |
IntegerType.DivOperation
The 'div' operation for Integers. |
class |
IntegerType.EqualOperation
The equal compare operation for Integers. |
class |
IntegerType.GreaterEqualOperation
The 'greater equal' compare operation for Integers. |
class |
IntegerType.GreaterOperation
The 'greater' compare operation for Integers. |
class |
IntegerType.LessEqualOperation
The 'less equal' compare operation for Integers. |
class |
IntegerType.LessOperation
The 'less' compare operation for Integers. |
class |
IntegerType.MaxOperation
The 'max' operation for Integers. |
class |
IntegerType.MinOperation
The 'min' operation for Integers. |
class |
IntegerType.ModOperation
The 'mod' operation for Integers. |
class |
IntegerType.MulOperation
The 'mul' operation for Integers. |
class |
IntegerType.NotEqualOperation
The 'not equal' compare operation for Integers. |
class |
IntegerType.SubOperation
The 'sub' operation for Integers. |
Nested classes/interfaces inherited from class org.ujac.util.exi.type.BaseNumberType |
---|
BaseNumberType.FormatOperation |
Nested classes/interfaces inherited from class org.ujac.util.exi.type.BaseType |
---|
BaseType.InstanceofOperation, BaseType.ObjectDefinedOperation, BaseType.ObjectNotDefinedOperation, BaseType.ToStringOperation |
Field Summary |
---|
Fields inherited from class org.ujac.util.exi.type.BaseType |
---|
interpreter, operations |
Constructor Summary | |
---|---|
IntegerType(ExpressionInterpreter interpreter,
Class clazz,
String alias)
Constructs a IntegerType instance with no specific arguments. |
Method Summary | |
---|---|
protected String |
execToString(ExpressionTuple expr,
FormatHelper formatHelper)
Executes the toString operation. |
String |
getAlias()
Gets the alias of the expression type. |
Number |
getNegative(Number number)
Gets the negative value for the given number. |
Class |
getType()
Gets the class of the expression type. |
Object |
typeCast(Object value)
Casts the given value into the handler-specific type. |
Methods inherited from class org.ujac.util.exi.type.BaseType |
---|
addOperation, evalTuple, getDescription, getOperation, getOperationNames, getOperations, getTypeName, removeAllOperations, removeOperation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntegerType(ExpressionInterpreter interpreter, Class clazz, String alias)
interpreter
- The expression interpreter.clazz
- The class this handler gets registered for.alias
- The type alias.Method Detail |
---|
protected String execToString(ExpressionTuple expr, FormatHelper formatHelper)
execToString
in class BaseType
expr
- The expression, holding the object to get as string.formatHelper
- The format helper to use.
public Class getType()
ExpressionType
ExpressionType.getType()
public String getAlias()
getAlias
in interface ExpressionType
getAlias
in class BaseType
public Number getNegative(Number number)
getNegative
in class BaseNumberType
number
- The number to negate.
public Object typeCast(Object value) throws TypeCastException
typeCast
in interface ExpressionType
typeCast
in class BaseType
value
- The value to cast.
TypeCastException
- In case the type cast failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |