Module math

Interface ArrayAdapter<T,A>

Type Parameters:
T - Item type
A - Array object type
All Known Subinterfaces:
NumberArrayAdapter<N,A>

public interface ArrayAdapter<T,A>
Adapter for array-like things. For example, arrays and lists.
Author:
Erich Schubert
  • Method Summary

    Modifier and Type
    Method
    Description
    get(A array, int off)
    Get the off'th item from the array.
    int
    size(A array)
    Get the size of the array.
  • Method Details

    • size

      int size(A array)
      Get the size of the array.
      Parameters:
      array - Array-like thing
      Returns:
      Size
    • get

      T get(A array, int off) throws IndexOutOfBoundsException
      Get the off'th item from the array.
      Parameters:
      array - Array to get from
      off - Offset
      Returns:
      Item at offset off
      Throws:
      IndexOutOfBoundsException - for an invalid index.