Class RangeByte

Object
Range
RangeByte

public class RangeByte extends Range
This class is a subclass of the Range class handling byte data.

Byte data is represented as an integer & 0xFF to avoid unsigned.

  • Field Details

    • FULL_RANGE

      public static RangeByte FULL_RANGE
  • Method Details

    • contains

      public boolean contains(byte value)
      Description copied from class: Range
      Method for checking if a byte value is contained inside the Range
      Overrides:
      contains in class Range
    • getDataType

      public Range.DataType getDataType()
      Description copied from class: Range
      Returns the Range data Type
      Specified by:
      getDataType in class Range
    • isPoint

      public boolean isPoint()
      Description copied from class: Range
      Indicates if the Range is a degenerated single point Range or not
      Specified by:
      isPoint in class Range
    • getMax

      public Integer getMax()
      Range max, represented as Integer & 0xFF "unsigned" byte. To use: {@code byte value = (byte) range.getMax().byteValue(); @return Integer masked to {@code 0xFF}.
      Specified by:
      getMax in class Range
    • getMax

      public Integer getMax(boolean isMaxIncluded)
      Range max, represented as Integer & 0xFF "unsigned" byte. To use: {@code byte value = (byte) range.getMax().byteValue(); @param isMaxIncluded boolean indicating if the maximum bound is included @return Integer masked to {@code 0xFF}.
      Specified by:
      getMax in class Range
    • getMin

      public Integer getMin(boolean isMinIncluded)
      Range min, represented as Integer & 0xFF "unsigned" byte. To use: {@code byte value = (byte) range.getMin().byteValue(); @return Integer masked to {@code 0xFF}.
      Specified by:
      getMin in class Range
    • getMin

      public Integer getMin()
      Description copied from class: Range
      Returns the minimum bound of the Range
      Specified by:
      getMin in class Range
    • union

      public RangeByte union(Range other)
      Specified by:
      union in class Range
    • intersection

      public RangeByte intersection(Range other)
      Specified by:
      intersection in class Range