Class GenericCellLevelCharacteristics
- All Implemented Interfaces:
Describable,Identifiable,CellLevelCharacteristics
For cell types, use CellTypeAssignment instead.
This is not meant to be used directly, prefer CellLevelCharacteristics.Factory.newInstance(java.lang.String, java.lang.String, java.util.List<ubic.gemma.model.common.description.Characteristic>, int[]) for creating
cell-level characteristics or CellTypeAssignment for cell types.
- Author:
- poirigui
-
Nested Class Summary
Nested classes/interfaces inherited from interface ubic.gemma.model.expression.bioAssayData.CellLevelCharacteristics
CellLevelCharacteristics.Factory -
Field Summary
Fields inherited from interface ubic.gemma.model.expression.bioAssayData.CellLevelCharacteristics
COMPARATOR, UNKNOWN_CHARACTERISTIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanImportant note: Two objects with the same class and non-null ID must be considered equal.getCharacteristic(int cellIndex) Obtain the characteristic assigned to a given cell.List of characteristic.int[]Each entry indicate which characteristic fromCellLevelCharacteristics.getCharacteristics()is applicable for a given cell.Obtain the number of cells assigned with a characteristic.intThe number of characteristics inCellLevelCharacteristics.getCharacteristics().inthashCode()Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.voidsetCharacteristics(List<Characteristic> characteristics) voidsetIndices(int[] indices) voidsetNumberOfAssignedCells(Integer numberOfAssignedCells) voidsetNumberOfCharacteristics(int numberOfCharacteristics) toString()Methods inherited from class ubic.gemma.model.common.AbstractDescribable
getDescription, getName, setDescription, setNameMethods inherited from class ubic.gemma.model.common.AbstractIdentifiable
getId, setIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ubic.gemma.model.expression.bioAssayData.CellLevelCharacteristics
getNameMethods inherited from interface ubic.gemma.model.common.Describable
getDescriptionMethods inherited from interface ubic.gemma.model.common.Identifiable
getId
-
Constructor Details
-
GenericCellLevelCharacteristics
public GenericCellLevelCharacteristics()
-
-
Method Details
-
getCharacteristic
Description copied from interface:CellLevelCharacteristicsObtain the characteristic assigned to a given cell.- Specified by:
getCharacteristicin interfaceCellLevelCharacteristics- Returns:
- the characteristic or
nullif the cell is assigned toCellLevelCharacteristics.UNKNOWN_CHARACTERISTIC.
-
hashCode
public int hashCode()Description copied from class:AbstractIdentifiableImportant note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.- Overrides:
hashCodein classAbstractDescribable
-
equals
Description copied from class:AbstractIdentifiableImportant note: Two objects with the same class and non-null ID must be considered equal. If one or both IDs are nulls, the rest of the state can be used to determine equality.- Specified by:
equalsin classAbstractIdentifiable
-
toString
- Overrides:
toStringin classAbstractDescribable
-
getCharacteristics
Description copied from interface:CellLevelCharacteristicsList of characteristic.- Specified by:
getCharacteristicsin interfaceCellLevelCharacteristics
-
getNumberOfCharacteristics
public int getNumberOfCharacteristics()Description copied from interface:CellLevelCharacteristicsThe number of characteristics inCellLevelCharacteristics.getCharacteristics().- Specified by:
getNumberOfCharacteristicsin interfaceCellLevelCharacteristics
-
getIndices
public int[] getIndices()Description copied from interface:CellLevelCharacteristicsEach entry indicate which characteristic fromCellLevelCharacteristics.getCharacteristics()is applicable for a given cell.CellLevelCharacteristics.UNKNOWN_CHARACTERISTICis used to indicate a missing value for a cell. In this case,CellLevelCharacteristics.getCharacteristic(int)returnsnull.The size of this array is the number of cells, typically in a
SingleCellDimension.- Specified by:
getIndicesin interfaceCellLevelCharacteristics
-
getNumberOfAssignedCells
Description copied from interface:CellLevelCharacteristicsObtain the number of cells assigned with a characteristic.This is equal to the number of entries in
CellLevelCharacteristics.getIndices()that are notCellLevelCharacteristics.UNKNOWN_CHARACTERISTIC.TOOD: switch to a regular
intonce existing CLCs have all been back-filled.- Specified by:
getNumberOfAssignedCellsin interfaceCellLevelCharacteristics
-
setCharacteristics
-
setNumberOfCharacteristics
public void setNumberOfCharacteristics(int numberOfCharacteristics) -
setIndices
public void setIndices(int[] indices) -
setNumberOfAssignedCells
-