Class StdMethodList

All Implemented Interfaces:
MethodList, ToHuman

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

    • StdMethodList

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

    • get

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

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