|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.util.PropertyKey
public final class PropertyKey
A key used for indexing attributes for an AShape. This is used from v5.5 instead if a
String to increase speed (indentity comparison rather than slower string comparison) and type safety.
Note that care has to be taken to never have two keys denoting the same attribute loaded in memory at the same time. The
XML delegate takes care of this through the getKey(String) method. If you want to create custom keys
| Field Summary | |
|---|---|
static int |
TRACE_IF_MORE_THAN
There will be an error log in System.err if more keys that this. |
| Method Summary | |
|---|---|
void |
checkTypeOfValue(java.lang.Object value)
|
boolean |
equals(java.lang.Object o)
|
static PropertyKey |
getKey(java.lang.String name)
Creates an uniqe key for name. |
static PropertyKey |
getKey(java.lang.String name,
java.lang.Class valueClass)
Creates an uniqe key for name. |
java.lang.String |
getName()
Returns the name for this key. |
java.lang.Class |
getValueClass()
Returns the class that the value that this property key is associated with should be or be a sub class of. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int TRACE_IF_MORE_THAN
| Method Detail |
|---|
public static final PropertyKey getKey(java.lang.String name)
name. If a key for the exact name has already been created that key will be returned.
Same as calling getKey(name, null).
name - The name of the key. If null it will be exchanged with the string "null".
public static final PropertyKey getKey(java.lang.String name,
java.lang.Class valueClass)
name. If a key for the exact name has already been created that key will be returned.
name - The name of the key. If null it will be exchanged with the string "null".valueClass - If != null the class will be stored in this PropertyKey when it is first created.
The meaning is normally that the value that is associated with this key is to be a class, or subclass, of this class.
Note that if a key is already created for name this argument will not be used.
The handler of this PropertyKey may make use of this property, it is in now way enforced by this class.
public final java.lang.Class getValueClass()
It can be null which should be interpreted as any class.
If values can be null if this class is specified is up to the implementation to define.
public final java.lang.String getName()
null.public final java.lang.String toString()
toString in class java.lang.Objectpublic final boolean equals(java.lang.Object o)
equals in class java.lang.Object
public final void checkTypeOfValue(java.lang.Object value)
throws java.lang.ClassCastException
java.lang.ClassCastException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||