Class/Object

com.zengularity.benji

Bytes

Related Docs: object Bytes | package benji

Permalink

final class Bytes extends AnyVal

Use this value type when you want to specify a size in terms of bytes or something like that in a type-safe way.

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Bytes
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. def -(other: Long): Bytes

    Permalink
  4. def -(data: Array[Byte]): Bytes

    Permalink

    Subtracts the size of the given data from this size representation, possibly returning negative values.

  5. def /:(other: Long): Long

    Permalink
  6. def <(other: Bytes): Boolean

    Permalink
  7. def <=(other: Bytes): Boolean

    Permalink
  8. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  9. def >(other: Bytes): Boolean

    Permalink

    To compare sizes

  10. def >=(other: Bytes): Boolean

    Permalink
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. val bytes: Long

    Permalink

    the number of bytes (binary size)

  13. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def toString(): String

    Permalink
    Definition Classes
    Bytes → Any
  16. def wasExceeded(data: Array[Byte]): Boolean

    Permalink

    Indicates whether this size value was exceeded by the given byte array.

    Indicates whether this size value was exceeded by the given byte array.

    For example,

    {{ Bytes(5).wasExceeded("123456".getBytes) }}

    returns

    true as that array has a length of 6 and is thus greater than what we indicated (5 bytes).

Inherited from AnyVal

Inherited from Any

Ungrouped