Class ObjectType

java.lang.Object
smile.data.type.ObjectType
All Implemented Interfaces:
Serializable, DataType

public class ObjectType extends Object implements DataType
Object data type.
See Also:
  • Method Details

    • getObjectClass

      public Class<?> 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.
      Specified by:
      isObject in 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.
      Specified by:
      isBoolean in 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.
      Specified by:
      isChar in 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.
      Specified by:
      isByte in 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.
      Specified by:
      isShort in 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.
      Specified by:
      isInt in 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.
      Specified by:
      isLong in 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.
      Specified by:
      isFloat in 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.
      Specified by:
      isDouble in interface DataType
      Returns:
      true if the type is double or Double.
    • name

      public String name()
      Description copied from interface: DataType
      Returns the type name used in external catalogs. DataType.of(name()) should return the same type.
      Specified by:
      name in interface DataType
      Returns:
      the type name used in external catalogs.
    • id

      public DataType.ID id()
      Description copied from interface: DataType
      Returns the type ID enum.
      Specified by:
      id in interface DataType
      Returns:
      the type ID enum.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(Object o)
      Description copied from interface: DataType
      Returns the string representation of a value of the type.
      Specified by:
      toString in interface DataType
      Parameters:
      o - the value.
      Returns:
      the string representation
    • valueOf

      public Object valueOf(String s)
      Description copied from interface: DataType
      Returns the value from its string representation.
      Specified by:
      valueOf in interface DataType
      Parameters:
      s - the string representation of a value of this type.
      Returns:
      the value.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object