java.io.SerializableDefaultConfigurationKey
instead. It is associated with a DefaultExpressionEngine and thus
can produce correct keys even if key separators have been changed.@Deprecated public class ConfigurationKey extends java.lang.Object implements java.io.Serializable
A simple class that supports creation of and iteration on complex configuration keys.
For key creation the class works similar to a StringBuilder: There are
several appendXXXX() methods with which single parts
of a key can be constructed. All these methods return a reference to the
actual object so they can be written in a chain. When using this methods
the exact syntax for keys need not be known.
This class also defines a specialized iterator for configuration keys. With such an iterator a key can be tokenized into its single parts. For each part it can be checked whether it has an associated index.
| Modifier and Type | Class | Description |
|---|---|---|
class |
ConfigurationKey.KeyIterator |
Deprecated.
A specialized iterator class for tokenizing a configuration key.
|
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
ESCAPED_DELIMITER |
Deprecated.
Constant for an escaped delimiter.
|
static char |
PROPERTY_DELIMITER |
Deprecated.
Constant for a property delimiter.
|
| Constructor | Description |
|---|---|
ConfigurationKey() |
Deprecated.
Creates a new, empty instance of
ConfigurationKey. |
ConfigurationKey(java.lang.String key) |
Deprecated.
Creates a new instance of
ConfigurationKey and
initializes it with the given key. |
| Modifier and Type | Method | Description |
|---|---|---|
ConfigurationKey |
append(java.lang.String property) |
Deprecated.
Appends the name of a property to this key.
|
ConfigurationKey |
appendAttribute(java.lang.String attr) |
Deprecated.
Appends an attribute to this configuration key.
|
ConfigurationKey |
appendIndex(int index) |
Deprecated.
Appends an index to this configuration key.
|
static java.lang.String |
attributeName(java.lang.String key) |
Deprecated.
Extracts the name of the attribute from the given attribute key.
|
ConfigurationKey |
commonKey(ConfigurationKey other) |
Deprecated.
Returns a configuration key object that is initialized with the part
of the key that is common to this key and the passed in key.
|
static java.lang.String |
constructAttributeKey(java.lang.String key) |
Deprecated.
Decorates the given key so that it represents an attribute.
|
ConfigurationKey |
differenceKey(ConfigurationKey other) |
Deprecated.
Returns the "difference key" to a given key.
|
boolean |
equals(java.lang.Object c) |
Deprecated.
Checks if two
ConfigurationKey objects are equal. |
int |
hashCode() |
Deprecated.
Returns the hash code for this object.
|
boolean |
isAttributeKey() |
Deprecated.
Checks if this key is an attribute key.
|
static boolean |
isAttributeKey(java.lang.String key) |
Deprecated.
Checks if the passed in key is an attribute key.
|
ConfigurationKey.KeyIterator |
iterator() |
Deprecated.
Returns an iterator for iterating over the single components of
this configuration key.
|
int |
length() |
Deprecated.
Returns the actual length of this configuration key.
|
void |
setLength(int len) |
Deprecated.
Sets the new length of this configuration key.
|
java.lang.String |
toString() |
Deprecated.
Returns a string representation of this object.
|
public static final char PROPERTY_DELIMITER
public static final java.lang.String ESCAPED_DELIMITER
public ConfigurationKey()
ConfigurationKey.public ConfigurationKey(java.lang.String key)
ConfigurationKey and
initializes it with the given key.key - the key as a stringpublic ConfigurationKey append(java.lang.String property)
property - the name of the property to be addedpublic ConfigurationKey appendIndex(int index)
index - the index to be appendedpublic ConfigurationKey appendAttribute(java.lang.String attr)
attr - the name of the attribute to be appendedpublic boolean isAttributeKey()
public static boolean isAttributeKey(java.lang.String key)
key - the key (part) to be checkedpublic static java.lang.String constructAttributeKey(java.lang.String key)
key - the key to be decoratedpublic static java.lang.String attributeName(java.lang.String key)
key - the attribute keypublic java.lang.String toString()
toString in class java.lang.Objectpublic ConfigurationKey.KeyIterator iterator()
public int length()
public void setLength(int len)
append() methods. The semantic is the same as
the setLength() method of StringBuilder.len - the new length of the keypublic boolean equals(java.lang.Object c)
ConfigurationKey objects are equal. The
method can be called with strings or other objects, too.equals in class java.lang.Objectc - the object to comparepublic int hashCode()
hashCode in class java.lang.Objectpublic ConfigurationKey commonKey(ConfigurationKey other)
other - the other keypublic ConfigurationKey differenceKey(ConfigurationKey other)
other = key.commonKey(other) + key.differenceKey(other)
for an arbitrary configuration key key.other - the key for which the difference is to be calculated