public abstract class Attribute extends java.lang.Object implements java.lang.Comparable<Attribute>
register(String)
method, whose return value should be used to instantiate the attribute. A class can implement
multiple typesModifier and Type | Field and Description |
---|---|
long |
type
The type of this attribute
|
Modifier | Constructor and Description |
---|---|
protected |
Attribute(long type) |
Modifier and Type | Method and Description |
---|---|
abstract Attribute |
copy() |
protected boolean |
equals(Attribute other) |
boolean |
equals(java.lang.Object obj) |
static java.lang.String |
getAttributeAlias(long type) |
static long |
getAttributeType(java.lang.String alias) |
int |
hashCode() |
protected static long |
register(java.lang.String alias)
Call this method to register a custom attribute type, see the wiki for an example.
|
java.lang.String |
toString() |
public static final long getAttributeType(java.lang.String alias)
public static final java.lang.String getAttributeAlias(long type)
protected static final long register(java.lang.String alias)
toString()
.alias
- The alias of the type to register, must be different for each dirrect type, will be used for debuggingpublic abstract Attribute copy()
protected boolean equals(Attribute other)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object