|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.xml.XMLStructureAdapter
hmi.elckerlyc.animationengine.motionunit.KeyPosition
public class KeyPosition
KeyPosition, used to store time and weight of motion unit keys. The time of the keypositions indicates where it is located within a motion unit. 0 < time <1 0 < weight <1 KeyPosition can be compared on time and weight. Time is more important. If time is equal, the smallest KeyPosition is the one with the smallest weight.
| Field Summary | |
|---|---|
String |
id
|
double |
time
|
double |
weight
|
| Fields inherited from class hmi.xml.XMLStructureAdapter |
|---|
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING |
| Constructor Summary | |
|---|---|
KeyPosition()
|
|
KeyPosition(String id,
double t,
double w)
|
|
| Method Summary | |
|---|---|
StringBuilder |
appendAttributeString(StringBuilder buf)
Appends a String to buf that encodes the attributes for the XML encoding. |
StringBuilder |
appendContent(StringBuilder buf,
XMLFormatting fmt)
Appends a String to buf that encodes the contents for the XML encoding. |
private int |
bmlIdCompareTo(String otherId)
|
int |
compareTo(KeyPosition o)
Comparable interface Compares this object with the specified object for order. |
boolean |
decodeAttribute(String attrName,
String attrValue,
XMLTokenizer tokenizer)
decodes the value from an attribute value String returns true if succesful, returns false for attribute names that are not recognized. |
void |
decodeAttributes(HashMap<String,String> attrMap,
XMLTokenizer tokenizer)
decodes all attributes. |
void |
decodeContent(XMLTokenizer tokenizer)
decodes the XML contents, i.e. the XML between the STag and ETag of the encoding. |
KeyPosition |
deepCopy()
Creates a deep copy of this instance |
boolean |
equals(Object o)
|
String |
getXMLTag()
returns the XML tag that is used to encode this type of XMLStructure. |
int |
hashCode()
|
boolean |
isEqual(KeyPosition o)
Keypositions are equal if they have equal ids |
String |
toString()
Get String representation of the key |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double time
public double weight
public String id
| Constructor Detail |
|---|
public KeyPosition()
public KeyPosition(String id,
double t,
double w)
| Method Detail |
|---|
public String toString()
toString in class XMLStructureAdapterprivate int bmlIdCompareTo(String otherId)
public int compareTo(KeyPosition o)
compareTo in interface Comparable<KeyPosition>public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic boolean isEqual(KeyPosition o)
public KeyPosition deepCopy()
public boolean decodeAttribute(String attrName,
String attrValue,
XMLTokenizer tokenizer)
XMLStructureAdapter
decodeAttribute in class XMLStructureAdapter
public void decodeContent(XMLTokenizer tokenizer)
throws IOException
XMLStructureAdapter
decodeContent in class XMLStructureAdapterIOException
public StringBuilder appendContent(StringBuilder buf,
XMLFormatting fmt)
XMLStructureAdapter
appendContent in class XMLStructureAdapterpublic StringBuilder appendAttributeString(StringBuilder buf)
XMLStructureAdapter
appendAttributeString in class XMLStructureAdapter
public void decodeAttributes(HashMap<String,String> attrMap,
XMLTokenizer tokenizer)
XMLStructureAdapter
decodeAttributes in class XMLStructureAdapterpublic String getXMLTag()
XMLStructureAdapter
getXMLTag in interface XMLStructuregetXMLTag in class XMLStructureAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||