|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.brunchboy.util.swing.relativelayout.Attribute
A simple, immutable class that represents a particular attribute within
a RelativeLayout. It tracks both the name of the component for which
the attribute is defined, and the type of the attribute.
| Field Summary | |
static String |
VERSION
Provides access to the CVS version of this class. |
| Constructor Summary | |
Attribute(String component,
AttributeType type)
Create an attribute description. |
|
| Method Summary | |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
String |
getComponent()
Return the name of the component assoicated with this attribute. |
AttributeType |
getType()
Return the type of attribute being represented. |
int |
hashCode()
Returns a hash code value for the object. |
String |
toString()
Provide a textual representation of the attribute type for debugging purposes. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String VERSION
| Constructor Detail |
public Attribute(String component,
AttributeType type)
component - the name of the component with which this attribute
is associated.type - the type of attribute being represented.| Method Detail |
public String getComponent()
public AttributeType getType()
public boolean equals(Object obj)
The equals method implements an equivalence relation:
x,
x.equals(x) should return true.
x and
y, x.equals(y) should return
true if and only if y.equals(x) returns
true.
x,
y, and z, if x.equals(y)
returns true and y.equals(z) returns
true, then x.equals(z) should return
true.
x
and y, multiple invocations of x.equals(y)
consistently return true or consistently return
false, provided no information used in
equals comparisons on the object is modified.
x,
x.equals(null) should return false.
The equals method for class Attribute checks that
the two attributes refer to the same component name and are of the same
type.
equals in class Objectobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.public int hashCode()
java.util.Hashtable.
The general contract of hashCode is:
hashCode method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtablepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||