Class SingleCellDimension
- java.lang.Object
-
- ubic.gemma.model.common.AbstractIdentifiable
-
- ubic.gemma.model.expression.bioAssayData.SingleCellDimension
-
- All Implemented Interfaces:
Identifiable
public class SingleCellDimension extends AbstractIdentifiable implements Identifiable
Represents a single-cell dimension, holding shared information for a set ofSingleCellExpressionDataVector
.- Author:
- poirigui
- See Also:
SingleCellExpressionDataVector
-
-
Constructor Summary
Constructors Constructor Description SingleCellDimension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Important note: Two objects with the same class and non-null ID must be considered equal.BioAssay
getBioAssay(int cellIndex)
Obtain theBioAssay
for a given cell position.List<String>
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.String
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
-
-
-
-
Method Detail
-
getBioAssay
public BioAssay getBioAssay(int cellIndex) throws IndexOutOfBoundsException
Obtain theBioAssay
for a given cell position.- Parameters:
cellIndex
- the cell position incellIds
- Throws:
IllegalArgumentException
- if the sparse range array is invalid as perListUtils.getSparseRangeArrayElement(List, int[], int, int)
IndexOutOfBoundsException
- if the index is out of bounds
-
getCellIdsBySample
public List<String> getCellIdsBySample(int sampleIndex)
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
public boolean equals(Object obj)
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
public String toString()
- Overrides:
toString
in classAbstractIdentifiable
-
-