Class SingleCellDimension
java.lang.Object
ubic.gemma.model.common.AbstractIdentifiable
ubic.gemma.model.expression.bioAssayData.SingleCellDimension
- All Implemented Interfaces:
Identifiable
Represents a single-cell dimension, holding shared information for a set of
SingleCellExpressionDataVector
.- Author:
- poirigui
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Important note: Two objects with the same class and non-null ID must be considered equal.getBioAssay
(int cellIndex) Obtain theBioAssay
for a given cell position.getCellIdsBySample
(int sampleIndex) Obtain a list of cell IDs for the given sample.int
getNumberOfCellsBySample
(int sampleIndex) Obtain the number for cells for the given sample.int
hashCode()
Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.toString()
Methods inherited from class ubic.gemma.model.common.AbstractIdentifiable
getId, setId
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ubic.gemma.model.common.Identifiable
getId
-
Constructor Details
-
SingleCellDimension
public SingleCellDimension()
-
-
Method Details
-
getBioAssay
Obtain theBioAssay
for a given cell position.- Parameters:
cellIndex
- the cell position incellIds
- Throws:
IllegalArgumentException
- if the sparse range array is invalid as perSparseListUtils.getSparseRangeArrayElement(List, int[], int, int)
IndexOutOfBoundsException
- if the index is out of bounds
-
getCellIdsBySample
Obtain a list of cell IDs for the given sample.- Parameters:
sampleIndex
- the sample position inbioAssays
-
getNumberOfCellsBySample
public int getNumberOfCellsBySample(int sampleIndex) Obtain the number for cells for the given sample.This is more efficient than looking up the size of
getCellIdsBySample(int)
.- Parameters:
sampleIndex
- the sample position inbioAssays
-
hashCode
public int hashCode()Description copied from class:AbstractIdentifiable
Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.- Specified by:
hashCode
in classAbstractIdentifiable
-
equals
Description copied from class:AbstractIdentifiable
Important 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:
equals
in classAbstractIdentifiable
-
toString
- Overrides:
toString
in classAbstractIdentifiable
-