| java.lang.Object org.quilt.reg.Registry
All known Subclasses: org.quilt.reg.QuiltRegistry,
Registry | public class Registry (Code) | | A registry for storing Quilt run-time options. The registry
stores key-value pairs, where the key takes the form of an array
of Strings. The registry is sorted, but XXX there is currently
no support for sequential access or partial-key access.
This class is not thread-safe.
author: Jim Dixon |
Constructor Summary | |
public | Registry() No-arg constructor. |
Method Summary | |
final public void | clear() Remove all elements from the registry. | final Comparator | comparator() Return comparator used in sorting keys. | final public boolean | containsKey(String[] key) True if there is an item under this key in the registry. | final public Object | get(String[] key) Get an object from the registry.
Parameters: key - Array of strings, the unique key. | final public boolean | isEmpty() True if there are no elements in the registry. | public Set | keySet() XXX An overly powerful method. | final public Object | put(String[] key, Object value) Add an object to the registry, overwriting any existing value.
Parameters: key - Array of Strings, the unique key. | final public Object | remove(String[] key) Remove an item from the registry.
Parameters: key - Array of Strings. | final public int | size() Number of items in the registry. | final public String[] | splitClassName(String name) Convert a class or method name into a String array. |
Registry | public Registry()(Code) | | No-arg constructor.
|
clear | final public void clear()(Code) | | Remove all elements from the registry.
|
comparator | final Comparator comparator()(Code) | | Return comparator used in sorting keys.
|
containsKey | final public boolean containsKey(String[] key)(Code) | | True if there is an item under this key in the registry. |
get | final public Object get(String[] key)(Code) | | Get an object from the registry.
Parameters: key - Array of strings, the unique key. value Object stored under the key, or null if none. |
isEmpty | final public boolean isEmpty()(Code) | | True if there are no elements in the registry. |
keySet | public Set keySet()(Code) | | XXX An overly powerful method.
The (editable) set of keys. |
put | final public Object put(String[] key, Object value)(Code) | | Add an object to the registry, overwriting any existing value.
Parameters: key - Array of Strings, the unique key. Must not be null. Parameters: value - Object to be stored under this key. Old value if there was one, null otherwise. |
remove | final public Object remove(String[] key)(Code) | | Remove an item from the registry.
Parameters: key - Array of Strings. The value associated with the key, or null if none. |
size | final public int size()(Code) | | Number of items in the registry. |
splitClassName | final public String[] splitClassName(String name)(Code) | | Convert a class or method name into a String array.
A string array containing the fields of the name. |
|
|