public class LabelBag extends java.lang.Object implements Bag
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LABEL_KEY
The default key that is associated with label.
|
private java.lang.Object |
mPartitionID
The value for the partition key.
|
private java.lang.Object |
mValue
The value for the Label.
|
static java.lang.String |
PARTITION_KEY
The key that designates the partition to which a node belongs to.
|
Constructor and Description |
---|
LabelBag()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object key,
java.lang.Object value)
Adds an object to the underlying bag corresponding to a particular key.
|
boolean |
containsKey(java.lang.Object key)
Returns true if the namespace contains a mapping for the specified key.
|
java.lang.Object |
get(java.lang.Object key)
Returns an objects corresponding to the key passed.
|
static void |
setLabelKey(java.lang.String key)
Sets the label key that is to be associated with the bag.
|
java.lang.String |
toString()
Returns a textual description of the Bag.
|
public static java.lang.String LABEL_KEY
public static final java.lang.String PARTITION_KEY
private java.lang.Object mValue
private java.lang.Object mPartitionID
public static void setLabelKey(java.lang.String key)
public java.lang.Object get(java.lang.Object key)
public boolean add(java.lang.Object key, java.lang.Object value)
public boolean containsKey(java.lang.Object key)
containsKey
in interface Bag
key
- The key that you want to search for in the bag.public java.lang.String toString()
toString
in class java.lang.Object