public final class KeySet extends Object
KeySet objects are used by Entry instances for storing all
keys that might be used to negotiate the parameter managed by the Entry. Individual
keys are represented as String objects.
Although most parameters are associated with just one key, there are some exceptions, hence
justifying the added complexity of using a dedicated class for managing keys in favor of simply
using multiple String objects.
| Constructor and Description |
|---|
KeySet(String value)
Constructor for creating
KeySet instances with just one
key. |
KeySet(String firstValue,
String... additionalValues)
Constructor for creating
KeySet instances with multiple
keys. |
| Modifier and Type | Method and Description |
|---|---|
String |
getValue()
Returns the primary key, stored at the first position in
values. |
String |
getValue(int index)
Returns the key stored at the specified position in
values. |
boolean |
matchKey(String key)
Returns
true if one of the keys in the set equals the
parameter. |
int |
size()
Returns the number of keys in this set.
|
String |
toString() |
public KeySet(String value)
KeySet instances with just one
key.value - the keypublic boolean matchKey(String key)
true if one of the keys in the set equals the
parameter.key - the key to compare to the set's keystrue if there is a match, false if
there is notpublic String getValue()
values.public String getValue(int index)
values.public int size()
Copyright © 2012 University of Konstanz, Distributed Systems Group. All Rights Reserved.