|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.data.attr.util.MultiHashMapHelpers
public final class MultiHashMapHelpers
This class contains static utilitarian methods that return information pertaining to attributes. The reason why the methods here are defined in this helper class and not in MultiHashMap is that the return values in these methods are simply computed using the public API methods of MultiHashMap. MultiHashMapHelpers is an implementation layer on top of MultiHashMap, whereas MultiHashMap provides only those methods which are either essential to its API or are optimized by its implementation.
Method Summary | |
---|---|
static List |
getAllAttributeKeys(String objectKey,
String attributeName,
MultiHashMap cyData,
MultiHashMapDefinition cyDataDef)
Convenience method for discovering all key sequnces that map into bound values; this method is primarily useful with attribute definitions that have nonzero key spaces. |
static List |
getAllAttributeKeysAlongPrefix(String objectKey,
String attributeName,
Object[] keyPrefix,
MultiHashMap cyData,
MultiHashMapDefinition cyDataDef)
Convenience method for discovering all key sequences having a given prefix that map into bound values; this method is primarily useful with attribute definitions that have nonzero key spaces. |
static List |
getAllAttributeValues(String objectKey,
String attributeName,
MultiHashMap cyData,
MultiHashMapDefinition cyDataDef)
Convenience method for discovering all attribute values on an object in a given attribute definition; this method is only useful with attribute definitions that have nonzero key spaces. |
static List |
getAllAttributeValuesAlongPrefix(String objectKey,
String attributeName,
Object[] keyPrefix,
MultiHashMap cyData,
MultiHashMapDefinition cyDataDef)
Convenience method for discovering attribute values along a specified key prefix; this method is only useful with attribute definitions that have nonzero key spaces. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static List getAllAttributeValues(String objectKey, String attributeName, MultiHashMap cyData, MultiHashMapDefinition cyDataDef)
objectKey
- the object whose attribute values to return.attributeName
- the attribute definition in which to find attribute
values.cyData
- the data repository to use to dig for attribute values.cyDataDef
- the data definition registry to use to find out about
the dimensionality of attributeName.
IllegalStateException
- if attributeName is not an existing
attribute definition in cyData and cyDataDef.
NullPointerException
- if any one of the input parameters is
null.public static List getAllAttributeValuesAlongPrefix(String objectKey, String attributeName, Object[] keyPrefix, MultiHashMap cyData, MultiHashMapDefinition cyDataDef)
objectKey
- the object whose attribute values to return.attributeName
- the attribute definition in which to find attribute
values.keyPrefix
- an array of length less than or equal to the
dimensionality of key space of attributeName; entry at index i contains
a "representative" from dimension i + 1 of the key space of
attributeName; keyPrefix may be either null or the empty array, in
which case all attribute values bound to objectKey in attributeName will
be returned; if keyPrefix is not empty, all bound values having key
sequences whose beginning matches the specified prefix will be returned.cyData
- the data repository to use to dig for attribute values.cyDataDef
- the data definition registry to use to find out about
the dimensionality of attributeName.
IllegalStateException
- if attributeName is not an existing
attribute definition in cyData and cyDataDef.
NullPointerException
- if any one of the input parameters except
keyPrefix is null, or if keyPrefix is of positive length and any one
of its entries is null.
ClassCastException
- if keyPrefix is of positive length and any
one of its entries does not match the type of object specified
by corresponding dimension type in attributeName's definition.
IllegalArgumentException
- if keyPrefix's length is
greater than the dimensionality of attributeName's key space.public static List getAllAttributeKeys(String objectKey, String attributeName, MultiHashMap cyData, MultiHashMapDefinition cyDataDef)
objectKey
- the object whose mapped attribute keys to return.attributeName
- the attribute definition in which to find
attribute keys.cyData
- the data repository to use to discover attribute keys.cyDataDef
- the data definition registry to use to find out about
the dimensionality of attributeName.
IllegalStateException
- if attributeName is not an existing
attribute definition in cyData and cyDataDef.
NullPointerException
- if any one of the input parameters is
null.public static List getAllAttributeKeysAlongPrefix(String objectKey, String attributeName, Object[] keyPrefix, MultiHashMap cyData, MultiHashMapDefinition cyDataDef)
objectKey
- the object whose mapped attribute keys to return.attributeName
- the attribute definition in which to find
attribute keys.keyPrefix
- an array of length less than or equal to the
dimensionality of key space of attributeName; entry at index i contains
a "representative" from dimension i + 1 of the key space of
attributeName; keyPrefix may be either null or the empty array, in which
case all attribute key sequences mapped to attribute values for
objectKey in attributeName will be returned; if keyPrefix is not empty,
all mapped key sequences having prefix keyPrefix will be returned.cyData
- the data repository to use to discover attribute keys.cyDataDef
- the data definition registry to use to find out about
the dimensionality of attributeName.
IllegalStateException
- if attributeName is not an existing
attribute definition in cyData and cyDataDef.
NullPointerException
- if any one of the input parameters except
keyPrefix is null, or if keyPrefix is of positive length and any one
of its entries is null.
ClassCastException
- if keyPrefix is of positive length and any
one of its entries does not match the type of object specified
by corresponding dimension type in attributeName's definition.
IllegalArgumentException
- if keyPrefix's length is
greater than the dimensionality of attributeName's key space.
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |