Class StdFieldList

All Implemented Interfaces:
FieldList, ToHuman

public final class StdFieldList extends FixedSizeList implements FieldList
Standard implementation of FieldList, which directly stores an array of Field objects and can be made immutable.
  • Constructor Details

    • StdFieldList

      public StdFieldList(int size)
      Constructs an instance. All indices initially contain null.
      Parameters:
      size - the size of the list
  • Method Details

    • get

      public Field get(int n)
      Get the nth field.
      Specified by:
      get in interface FieldList
      Parameters:
      n - n >= 0, n < size(); which field
      Returns:
      non-null; the field in question
    • set

      public void set(int n, Field field)
      Sets the field at the given index.
      Parameters:
      n - >= 0, < size(); which field
      field - null-ok; the field object