Package org.joou

Class UByte

All Implemented Interfaces:
Serializable, Comparable<UByte>

public final class UByte extends UNumber implements Comparable<UByte>
The unsigned byte type
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final UByte
    A constant holding the maximum value an unsigned byte can have as UByte, 28-1.
    static final short
    A constant holding the maximum value an unsigned byte can have, 28-1.
    static final UByte
    A constant holding the minimum value an unsigned byte can have as UByte, 0.
    static final short
    A constant holding the minimum value an unsigned byte can have, 0.
    private static final long
    Generated UID
    private final short
    The value modelling the content of this unsigned byte
    private static final UByte[]
    Cached values
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    UByte(byte value)
    Create an unsigned byte by masking it with 0xFF i.e.
    private
    UByte(int value)
    Create an unsigned byte
    private
    UByte(long value)
    Create an unsigned byte
    private
    UByte(short value)
    Create an unsigned byte
    private
    UByte(String value)
    Create an unsigned byte
  • Method Summary

    Modifier and Type
    Method
    Description
    add(int val)
     
    add(UByte val)
     
    int
     
    double
     
    boolean
     
    float
     
    int
     
    int
     
    long
     
    private static final UByte[]
    Generate a cached value for each byte value.
    private static short
    rangeCheck(int value)
    Throw exception if value out of range (int version)
    private static short
    rangeCheck(long value)
    Throw exception if value out of range (long version)
    private static short
    rangeCheck(short value)
    Throw exception if value out of range (short version)
    private Object
    Replace version read through deserialization with cached version.
    subtract(int val)
     
     
    Get this number as a BigInteger.
     
    static UByte
    valueOf(byte value)
    Get an instance of an unsigned byte by masking it with 0xFF i.e.
    static UByte
    valueOf(int value)
    Get an instance of an unsigned byte
    static UByte
    valueOf(long value)
    Get an instance of an unsigned byte
    static UByte
    valueOf(short value)
    Get an instance of an unsigned byte
    static UByte
    valueOf(String value)
    Get an instance of an unsigned byte
    private static UByte
    valueOfUnchecked(short value)
    Get the value of a short without checking the value.

    Methods inherited from class java.lang.Number

    byteValue, shortValue

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Generated UID
      See Also:
    • VALUES

      private static final UByte[] VALUES
      Cached values
    • MIN_VALUE

      public static final short MIN_VALUE
      A constant holding the minimum value an unsigned byte can have, 0.
      See Also:
    • MAX_VALUE

      public static final short MAX_VALUE
      A constant holding the maximum value an unsigned byte can have, 28-1.
      See Also:
    • MIN

      public static final UByte MIN
      A constant holding the minimum value an unsigned byte can have as UByte, 0.
    • MAX

      public static final UByte MAX
      A constant holding the maximum value an unsigned byte can have as UByte, 28-1.
    • value

      private final short value
      The value modelling the content of this unsigned byte
  • Constructor Details

  • Method Details