[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Helper for questions about types.
what is the boxed type for a primitive type
is this a numeric type.
The following tables list the members exposed by the TypeHelper type.
Public Methods
Name | Description | |
---|---|---|
![]() ![]() | CoerceNumber |
Coerce the given number to the given type. Allows coerce to lower resultion number.
Doesn't coerce to primitive types.
numToCoerce is the number to coerce to the given typethe result type to return |
![]() | Equals | (Inherited from Object.) |
![]() ![]() | GetArithmaticCoercionType |
Returns the coercion type for the 2 numeric types for use in arithmatic.
Note: byte and short types always result in integer.
|
![]() ![]() | GetBoxedType |
Returns the boxed class for the given class, or the class itself if already boxed or not a primitive type.
For primitive unboxed types returns the boxed types, e.g. returns java.lang.Integer for passing int.class.
For any other class, returns the class passed.
|
![]() ![]() | GetBoxedTypeName |
Returns for the class name given the class name of the boxed (wrapped) type if
the class name is one of the CLR primitive types.
|
![]() ![]() | GetCommonCoercionType | Determines a common denominator type to which one or more types can be casted or coerced.
For use in determining the result type in certain expressions (coalesce, case).
Null values are allowed as part of the input and indicate a 'null' constant value in an expression tree. Such as value doesn't have any type and can be ignored in determining a result type. For numeric types, determines a coercion type that all types can be converted to via the method GetArithmaticCoercionType. Indicates that there is no common denominator type by throwing net.esper.util.CoercionException. |
![]() ![]() | GetCompareToCoercionType |
Returns for 2 classes to be compared via relational operator the Class type of
common comparison. The output is always Long.class, double.class, String.class or bool.class
depending on whether the passed types are numeric and floating-point.
Accepts primitive as well as boxed types.
|
![]() | GetHashCode | Serves as a hash function for a particular type. GetHashCode() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | IsAssignmentCompatible |
Returns true if 2 classes are assignment compatible.
|
![]() ![]() | IsBoolean |
Determines whether the specified type is boolean.
|
![]() ![]() | IsBuiltinDataType |
Returns true if the class passed in is a built-in data type (primitive or wrapper)
including String.
|
![]() ![]() | IsCharacter |
Returns true if the type represents a character type.
|
![]() ![]() | IsFloatingPointClass |
Returns true if the supplied type is a floating point number.
|
![]() ![]() | IsFloatingPointNumber |
Returns true if the Number instance is a floating point number.
|
![]() ![]() | IsNumeric | Determines if the class passed in is one of the numeric classes. |
![]() | ResolveType | Overloaded. |
![]() | ToString | (Inherited from Object.) |