Class ByteBlockList

All Implemented Interfaces:
ToHuman

public final class ByteBlockList extends LabeledList
List of ByteBlock instances.
  • Constructor Details

    • ByteBlockList

      public ByteBlockList(int size)
      Constructs an instance.
      Parameters:
      size - >= 0; the number of elements to be in the list
  • Method Details

    • get

      public ByteBlock get(int n)
      Gets the indicated element. It is an error to call this with the index for an element which was never set; if you do that, this will throw NullPointerException.
      Parameters:
      n - >= 0, < size(); which element
      Returns:
      non-null; the indicated element
    • labelToBlock

      public ByteBlock labelToBlock(int label)
      Gets the block with the given label.
      Parameters:
      label - the label to look for
      Returns:
      non-null; the block with the given label
    • set

      public void set(int n, ByteBlock bb)
      Sets the element at the given index.
      Parameters:
      n - >= 0, < size(); which element
      bb - null-ok; the value to store