Class IdArray
java.lang.Object
ubic.gemma.model.analysis.expression.coexpression.IdArray
- Direct Known Subclasses:
GeneCoexpressedGenes,GeneCoexpressionTestedIn,IdArrayValueObject,SupportDetails
Represents a set of IDs for entities (e.g., genes or experiments), stored in a bitSet.
- Author:
- Paul
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntities(Collection<Long> ids) voidAdd the data set to the list of those which are in the array.byte[]getBytes()getIds()intbooleanisIncluded(Long g) Use 'and' instead if possible.voidremoveEntity(Long ds) voidsetBytes(byte[] bytes) toString()
-
Field Details
-
data
protected com.googlecode.javaewah.EWAHCompressedBitmap data
-
-
Constructor Details
-
IdArray
public IdArray()
-
-
Method Details
-
addEntities
-
addEntity
Add the data set to the list of those which are in the array. If it is already included, nothing will change.- Parameters:
ds- this is cast to an int- Throws:
IllegalArgumentException- if the value is too larger to be stored as an integer.
-
and
- Parameters:
other- the other idArray to compare with.- Returns:
- datasets IDs it has in common with this.
-
andSet
- Parameters:
other- the other idArray to compare with.- Returns:
- datasets IDs it has in common with this, as a set
-
getBytes
public byte[] getBytes() -
setBytes
public void setBytes(byte[] bytes) -
getIds
- Returns:
- datasets IDs
-
getIdsSet
- Returns:
- set representation
-
getNumIds
public int getNumIds()- Returns:
- how many datasets there are
-
isIncluded
Use 'and' instead if possible.- Parameters:
g- the id to check for- Returns:
- true if the given id is in this array
-
removeEntity
- Parameters:
ds- ID of dataset to remove. If it isn't here, has no effect.
-
toString
-