|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfaa.tg.aircraft.Acid
public class Acid
Defines an Acid (aircraft ID) type.See the source Acid.java
HasAcid,
Serialized Form| Field Summary | |
|---|---|
protected java.lang.String |
acid
|
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
Acid(java.lang.String acid)
Constructor for an Acid (converts text to standard format). |
|
| Method Summary | |
|---|---|
int |
compareTo(Acid otherAcid)
|
boolean |
equals(java.lang.Object other)
Acids are equal if there acid member strings are the equal. |
java.lang.String |
getLetterPart()
|
int |
hashCode()
Careful, even though Acid will return the same hashcode as a String you cannot retrieve an Acid from a hashed collection using a String, because the hash retrieve will use String's equals to see if the right key was retrieve and it fails the "if (anObject instanceof String)" HOWEVER if we were to make Acid a sub class of String then retrieval would work. |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
stdFormat(java.lang.String acid)
Converts the aircraft ID text specified to standard format: a string with only numerics is accepted as valid. |
java.lang.String |
toString()
Returns the ACID (aircraft ID) as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
protected java.lang.String acid
| Constructor Detail |
|---|
public Acid(java.lang.String acid)
acid - The ACID (aircraft ID).| Method Detail |
|---|
public static java.lang.String stdFormat(java.lang.String acid)
(Tries to get something that works: characters that are not alphanumerics will be removed from the text.)
acid - The ACID (aircraft ID) to format.
public int compareTo(Acid otherAcid)
compareTo in interface java.lang.Comparable<Acid>otherAcid - The ACID to compare against for determining order.
java.lang.ClassCastException - if the specified object's type prevents it
from being compared to this Object.public boolean equals(java.lang.Object other)
equals in class java.lang.ObjectObject.equals(java.lang.Object),
hashCode()public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getLetterPart()
public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||