Interface CellLevelCharacteristics
-
- All Superinterfaces:
Identifiable
- All Known Implementing Classes:
CellTypeAssignment
,GenericCellLevelCharacteristics
public interface CellLevelCharacteristics extends Identifiable
Characteristics applicable to individual cells in aSingleCellDimension
.- Author:
- poirigui
- See Also:
CellTypeAssignment
,GenericCellLevelCharacteristics
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CellLevelCharacteristics.Factory
-
Field Summary
Fields Modifier and Type Field Description static int
UNKNOWN_CHARACTERISTIC
Indicator for an unknown characteristic.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Characteristic
getCharacteristic(int cellIndex)
Obtain the characteristic assigned to a given cell.List<Characteristic>
getCharacteristics()
List of characteristic.int[]
getIndices()
Each entry indicate which characteristic fromgetCharacteristics()
is applicable for a given cell.Integer
getNumberOfAssignedCells()
Obtain the number of cells assigned with a characteristic.int
getNumberOfCharacteristics()
The number of characteristics ingetCharacteristics()
.-
Methods inherited from interface ubic.gemma.model.common.Identifiable
getId
-
-
-
-
Field Detail
-
UNKNOWN_CHARACTERISTIC
static final int UNKNOWN_CHARACTERISTIC
Indicator for an unknown characteristic.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCharacteristics
List<Characteristic> getCharacteristics()
List of characteristic.
-
getNumberOfCharacteristics
int getNumberOfCharacteristics()
The number of characteristics ingetCharacteristics()
.
-
getIndices
int[] getIndices()
Each entry indicate which characteristic fromgetCharacteristics()
is applicable for a given cell.UNKNOWN_CHARACTERISTIC
is used to indicate a missing value for a cell. In this case,getCharacteristic(int)
returnsnull
.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 notUNKNOWN_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 toUNKNOWN_CHARACTERISTIC
. - Throws:
IndexOutOfBoundsException
- if the cell index is out of bounds
-
-