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 TypeMethodDescriptionbooleanClass<?> Returns the class of objects.id()Returns the type ID enum.booleanReturns true if the type is boolean or Boolean.booleanisByte()Returns true if the type is byte or Byte.booleanisChar()Returns true if the type is char or Char.booleanisDouble()Returns true if the type is double or Double.booleanisFloat()Returns true if the type is float or Float.booleanisInt()Returns true if the type is int or Integer.booleanisLong()Returns true if the type is long or Long.booleanisObject()Returns true if the type is ObjectType.booleanisShort()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, waitMethods 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:DataTypeReturns true if the type is ObjectType. -
isBoolean
public boolean isBoolean()Description copied from interface:DataTypeReturns true if the type is boolean or Boolean. -
isChar
public boolean isChar()Description copied from interface:DataTypeReturns true if the type is char or Char. -
isByte
public boolean isByte()Description copied from interface:DataTypeReturns true if the type is byte or Byte. -
isShort
public boolean isShort()Description copied from interface:DataTypeReturns true if the type is short or Short. -
isInt
public boolean isInt()Description copied from interface:DataTypeReturns true if the type is int or Integer. -
isLong
public boolean isLong()Description copied from interface:DataTypeReturns true if the type is long or Long. -
isFloat
public boolean isFloat()Description copied from interface:DataTypeReturns true if the type is float or Float. -
isDouble
public boolean isDouble()Description copied from interface:DataTypeReturns true if the type is double or Double. -
name
Description copied from interface:DataTypeReturns the type name used in external catalogs. DataType.of(name()) should return the same type. -
id
Description copied from interface:DataTypeReturns the type ID enum. -
toString
-
toString
Description copied from interface:DataTypeReturns the string representation of a value of the type. -
valueOf
Description copied from interface:DataTypeReturns the value from its string representation. -
equals
-