ml.combust.bundle.custom

CustomType

trait CustomType[T] extends AnyRef

Type class for a custom object.

Custom objects can be serialized in an ml.combust.bundle.dsl.AttributeList as an ml.combust.bundle.dsl.Value. They must provide a JSON serialization as well as a compact byte representation.

T

Scala class of custom type

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CustomType
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def format: RootJsonFormat[T]

    Get the Spray JSON format for the custom type.

    Get the Spray JSON format for the custom type.

    This is the formatter used for serializing/deserializing the custom type with JSON.

    returns

    Spray JSON format

  2. abstract val klazz: Class[T]

    Class of the custom type.

  3. abstract def name: String

    Get name of the custom type.

    Get name of the custom type.

    This can be anything as long as it is unique among custom types

    returns

    name of the custom type

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(obj: Any): Boolean

    Definition Classes
    CustomType → AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def fromBytes(bytes: Array[Byte]): T

    Convert compact bytes to custom object.

    Convert compact bytes to custom object.

    bytes

    compact byte array

    returns

    deserialized custom object

  12. def fromJsonBytes(bytes: Array[Byte]): T

    Convert byte array of JSON to custom object.

    Convert byte array of JSON to custom object.

    bytes

    JSON byte array

    returns

    deserialized custom object

  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def isLarge(obj: T): Boolean

    Whether or not this object is large when serialized.

    Whether or not this object is large when serialized.

    obj

    custom object

    returns

    true if large byte size when serialized, false otherwise

  17. def isSmall(obj: T): Boolean

    Whether or not this object is small when serialized.

    Whether or not this object is small when serialized.

    obj

    custom object

    returns

    true if small byte size when serialized, false otherwise

  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  22. def toBytes(obj: T): Array[Byte]

    Convert custom object to compact byte array.

    Convert custom object to compact byte array.

    obj

    custom object

    returns

    compact byte array serialization of obj

  23. def toJsonBytes(obj: T): Array[Byte]

    Convert object to byte array of JSON.

    Convert object to byte array of JSON.

    obj

    custom object

    returns

    byte array of JSON

  24. def toString(): String

    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped