Interface CellLevelCharacteristics

All Superinterfaces:
Describable, Identifiable
All Known Implementing Classes:
CellTypeAssignment, GenericCellLevelCharacteristics

public interface CellLevelCharacteristics extends Describable
Characteristics applicable to individual cells in a SingleCellDimension.
Author:
poirigui
See Also:
  • Field Details

  • Method Details

    • getName

      @Nullable String getName()
      Obtain the name of the object.

      It may be human-readable.

      It is case-insensitive and usually unique within a certain context (e.g. in a collection).

      It is non-null by default, but implementation may override this with a Nullable annotation. If null, it should not be treated as equal to other Describable objects (i.e. there can be multiple null-named describable within a given set).

      The name is not mandatory, but if set it will appear in lieu of the category.

      Specified by:
      getName in interface Describable
    • getCharacteristics

      List<Characteristic> getCharacteristics()
      List of characteristic.
    • getNumberOfCharacteristics

      int getNumberOfCharacteristics()
      The number of characteristics in getCharacteristics().
    • getIndices

      int[] getIndices()
      Each entry indicate which characteristic from getCharacteristics() is applicable for a given cell.

      UNKNOWN_CHARACTERISTIC is used to indicate a missing value for a cell. In this case, getCharacteristic(int) returns null.

      The size of this array is the number of cells, typically in a SingleCellDimension.

    • getNumberOfAssignedCells

      @Nullable Integer getNumberOfAssignedCells()
      Obtain the number of cells assigned with a characteristic.

      This is equal to the number of entries in getIndices() that are not UNKNOWN_CHARACTERISTIC.

      TOOD: switch to a regular int once existing CLCs have all been back-filled.

    • getCharacteristic

      @Nullable Characteristic getCharacteristic(int cellIndex) throws IndexOutOfBoundsException
      Obtain the characteristic assigned to a given cell.
      Returns:
      the characteristic or null if the cell is assigned to UNKNOWN_CHARACTERISTIC.
      Throws:
      IndexOutOfBoundsException - if the cell index is out of bounds