Packages

sealed abstract class Primitive extends Enum[Primitive] with Serializable with Representable

Supported primitive types.

They serve as basis for scalars - dimensions and values.

Note: String types should only be used when the dimension is an actual text snippet.

Linear Supertypes
Representable, Enum[Primitive], Serializable, Comparable[Primitive], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Primitive
  2. Representable
  3. Enum
  4. Serializable
  5. Comparable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def canBeDenseDimension(): Boolean

    returns

    if this primitive type can be used as a dimension in dense tensors. In other words, is this type integral. If true, the type MUST support #toInt, #toLong, and #from with both int and long value.

  2. abstract def canBeValue(): Boolean

    This method is called to check if the column Type of the value can be of the specified Primitive.

    This method is called to check if the column Type of the value can be of the specified Primitive.

    returns

    the Primitive of the column type

  3. abstract def compare(leftTuple: ReadableTuple, leftColumn: Int, rightTuple: ReadableTuple, rightColumn: Int): Int

    Compares data at leftTuple[leftColumn] with data at rightTuple[rightColumn] Note: The representation of both leftColumn and rightColumn is assumed to be the same as this No validation on representation is performed

    Compares data at leftTuple[leftColumn] with data at rightTuple[rightColumn] Note: The representation of both leftColumn and rightColumn is assumed to be the same as this No validation on representation is performed

    leftTuple

    left tuple from which a column will be compared

    leftColumn

    column in leftTuple that will be compared

    rightTuple

    right tuple from which a column will be compared

    rightColumn

    column in right tuple that will be compared

    returns

    -1 if lefttuple[leftColumn] < rightTuple[rightColumn], 0 if lefttuple[leftColumn] == rightTuple[rightColumn], 1 if lefttuple[leftColumn] > rightTuple[rightColumn]

  4. abstract def copy(fromTuple: ReadableTuple, fromColumn: Int, toTuple: WriteableTuple, toColumn: Int): Unit

    Copies data from fromTuple[fromColumn] to toTuple[toColumn] Note: The representation of both fromColumn and toColumn is assumed to be the same as this No validation on representation is performed

    Copies data from fromTuple[fromColumn] to toTuple[toColumn] Note: The representation of both fromColumn and toColumn is assumed to be the same as this No validation on representation is performed

    fromTuple

    ReadableTuple from which to copy

    fromColumn

    column in fromTuple to copy

    toTuple

    WriteableTuple where the data would be copied

    toColumn

    column in toTuple where the data would be copied

  5. abstract def equals(leftTuple: ReadableTuple, leftColumn: Int, rightTuple: ReadableTuple, rightColumn: Int): Boolean

    Matches data at leftTuple[leftColumn] with data at rightTuple[rightColumn] Note: The representation of both leftColumn and rightColumn is assumed to be the same as this No validation on representation is performed

    Matches data at leftTuple[leftColumn] with data at rightTuple[rightColumn] Note: The representation of both leftColumn and rightColumn is assumed to be the same as this No validation on representation is performed

    leftTuple

    left tuple from which a column will be matched

    leftColumn

    column in leftTuple that will be matched

    rightTuple

    right tuple from which a column will be matched

    rightColumn

    column in right tuple that will be matched

    returns

    true if data is equal, false otherwise

  6. abstract def from(value: Array[Byte], tuple: WriteableTuple, column: Int): Unit

    Stores value from its byte[] serialization in the input tuple.

    Stores value from its byte[] serialization in the input tuple.

    For numeric types (int, long, float, double), BIG_ENDIAN byte order is expected.

    For string type, a UTF-8 charset is used to construct the string.

    For booleans, only the leading byte of the array is checked.

    value

    Input value

    tuple

    Input tuple to store the value

    column

    Column index

  7. abstract def from(value: String, tuple: WriteableTuple, column: Int): Unit
  8. abstract def from(value: Boolean, tuple: WriteableTuple, column: Int): Unit
  9. abstract def from(value: Double, tuple: WriteableTuple, column: Int): Unit
  10. abstract def from(value: Float, tuple: WriteableTuple, column: Int): Unit
  11. abstract def from(value: Long, tuple: WriteableTuple, column: Int): Unit
  12. abstract def from(value: Int, tuple: WriteableTuple, column: Int): Unit
  13. abstract def from(value: Number, tuple: WriteableTuple, column: Int): Unit
  14. abstract def isInstance(obj: Any): Boolean

    check whether the input object is of the primitive type without coercion.

  15. abstract def toBoolean(tuple: ReadableTuple, column: Int): Boolean
  16. abstract def toBytes(tuple: ReadableTuple, column: Int): Array[Byte]

    Returns value serialized into a byte[].

    Returns value serialized into a byte[].

    For numeric types (int, long, float, double), BIG_ENDIAN byte order is preserved.

    For string type, a UTF-8 charset is used to get bytes.

    For booleans, a single byte is returned in the array.

    tuple

    Input tuple

    column

    Column index

    returns

    Value in byte[]

  17. abstract def toDouble(tuple: ReadableTuple, column: Int): Double
  18. abstract def toFloat(tuple: ReadableTuple, column: Int): Float
  19. abstract def toInt(tuple: ReadableTuple, column: Int): Int
  20. abstract def toLong(tuple: ReadableTuple, column: Int): Long
  21. abstract def toObject(tuple: ReadableTuple, column: Int): AnyRef
  22. abstract def toString(tuple: ReadableTuple, column: Int): String

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    Enum → AnyRef
    Annotations
    @throws( ... )
  6. final def compareTo(arg0: Primitive): Int
    Definition Classes
    Enum → Comparable
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. final def equals(arg0: Any): Boolean
    Definition Classes
    Enum → AnyRef → Any
  9. final def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    Enum → AnyRef
  10. def from(value: Any, tuple: WriteableTuple, column: Int): Unit
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def getDeclaringClass(): Class[Primitive]
    Definition Classes
    Enum
  13. def getRepresentation(): Primitive
    Definition Classes
    Primitive → Representable
    Annotations
    @Override()
  14. final def hashCode(): Int
    Definition Classes
    Enum → AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def name(): String
    Definition Classes
    Enum
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def ordinal(): Int
    Definition Classes
    Enum
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    Enum → AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Representable

Inherited from Enum[Primitive]

Inherited from Serializable

Inherited from Comparable[Primitive]

Inherited from AnyRef

Inherited from Any

Ungrouped