|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.rt.util.Identity
public class Identity
A variable identity uniquely identifying a variable by its type and a set of key attribute values. The string representation of Identity is unique for the correponding variable instance, too. The string representation should contain only valid HTML4 id characters (A-Za-z), (0-9), (.), (-), (_) and (:).
Note that getters return direct references to value and key arrays causing changes to their elements to affect the internal state of the identity.
| Constructor Summary | |
|---|---|
Identity(Object[] ids,
String type)
Constucts a new identity with multiple ids. |
|
Identity(Object[] ids,
String type,
int ind)
Constucts a new indexed identity with multiple ids. |
|
Identity(Object id,
String type)
Constucts a new identity. |
|
Identity(Object id,
String type,
int ind)
Constucts a new indexed identity. |
|
Identity(String name)
Constucts a new identity from the typed canonical name. |
|
Identity(Variable var)
Constucts a new variable identity. |
|
Identity(Variable var,
int ind)
Constucts a new variable identity with multiple keys. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
boolean |
equals(Object other)
|
int |
getIndex()
Gets the index. |
String |
getType()
Gets the class type. |
Object |
getValue()
Gets the key attribute value. |
Object[] |
getValues()
Gets the key attribute values. |
int |
hashCode()
|
boolean |
identifies(Variable var)
Checks whether this identity identifies the specified variable. |
int |
length()
Returns the length of the id value array. |
void |
setIndex(int ind)
Sets the index. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Identity(Object id,
String type)
id - the key value.type - the class type.
public Identity(Object[] ids,
String type)
ids - the key values.type - the class type.
public Identity(Object id,
String type,
int ind)
id - the key value.type - the class type.ind - the index.
public Identity(Object[] ids,
String type,
int ind)
ids - the key values.type - the class type.ind - the index.public Identity(Variable var)
var - the variable.key - the key attribute.
public Identity(Variable var,
int ind)
var - the variable.keys - the key attributes.ind - the index.public Identity(String name)
name - the canonical name.| Method Detail |
|---|
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic Object clone()
clone in class Objectpublic String toString()
toString in class Objectpublic Object getValue()
public Object[] getValues()
public String getType()
public int getIndex()
public void setIndex(int ind)
ind - the index.public int length()
public boolean identifies(Variable var)
var - the varianble.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||