Package smile.data.type
Class ObjectType
java.lang.Object
smile.data.type.ObjectType
- All Implemented Interfaces:
Serializable
,DataType
Object data type.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface smile.data.type.DataType
DataType.ID
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Class
<?> Returns the class of objects.id()
Returns the type ID enum.boolean
Returns true if the type is boolean or Boolean.boolean
isByte()
Returns true if the type is byte or Byte.boolean
isChar()
Returns true if the type is char or Char.boolean
isDouble()
Returns true if the type is double or Double.boolean
isFloat()
Returns true if the type is float or Float.boolean
isInt()
Returns true if the type is int or Integer.boolean
isLong()
Returns true if the type is long or Long.boolean
isObject()
Returns true if the type is ObjectType.boolean
isShort()
Returns true if the type is short or Short.name()
Returns the type name used in external catalogs.toString()
Returns the string representation of a value of the type.Returns the value from its string representation.Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface smile.data.type.DataType
boxed, isFloating, isIntegral, isNumeric, isPrimitive, isString, unboxed
-
Method Details
-
getObjectClass
Returns the class of objects. This is different from Object.getClass(), which returns ObjectType.class.- Returns:
- the class of objects.
-
isObject
public boolean isObject()Description copied from interface:DataType
Returns true if the type is ObjectType. -
isBoolean
public boolean isBoolean()Description copied from interface:DataType
Returns true if the type is boolean or Boolean. -
isChar
public boolean isChar()Description copied from interface:DataType
Returns true if the type is char or Char. -
isByte
public boolean isByte()Description copied from interface:DataType
Returns true if the type is byte or Byte. -
isShort
public boolean isShort()Description copied from interface:DataType
Returns true if the type is short or Short. -
isInt
public boolean isInt()Description copied from interface:DataType
Returns true if the type is int or Integer. -
isLong
public boolean isLong()Description copied from interface:DataType
Returns true if the type is long or Long. -
isFloat
public boolean isFloat()Description copied from interface:DataType
Returns true if the type is float or Float. -
isDouble
public boolean isDouble()Description copied from interface:DataType
Returns true if the type is double or Double. -
name
Description copied from interface:DataType
Returns the type name used in external catalogs. DataType.of(name()) should return the same type. -
id
Description copied from interface:DataType
Returns the type ID enum. -
toString
-
toString
Description copied from interface:DataType
Returns the string representation of a value of the type. -
valueOf
Description copied from interface:DataType
Returns the value from its string representation. -
equals
-