|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--wtanaka.praya.gale.Location
Represents the "Location" concept, introduced as the "Gale New World Order" with the 0.99danger "dangermouse" release. The brief introduction to the New World Order Gale at http://gale.org/revolution/nwo has some relevant information. Tessa Lau has also created some notes on the so-called Gale NWO at http://fugu.gale.org/protocol.
Return to
or the Praya Homepage
| Field Summary | |
char |
LOCAL_PART_SEPARATOR
|
private java.lang.String |
m_domainPart
|
private java.lang.String |
m_fullString
|
private java.lang.String |
m_localPart
|
private java.lang.String[] |
m_localPieces
|
private java.lang.String |
m_originalString
|
| Constructor Summary | |
Location(java.lang.String locationString)
Constructor takes a fully qualified location |
|
Location(java.lang.String locationString,
java.lang.String defaultDomain)
Constructor takes the string representation of a location. |
|
| Method Summary | |
Location[] |
candidateKeyNames()
Given this location, for instance "pub.gale@ofb.net", construct the list of candidate key names for this location: pub.gale@ofb.net pub.*@ofb.net *@ofb.net There will always be N+1 candidate key names for a location with N local parts (e.g., "pub" and "gale"). |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getBackwardString()
Joins the local pieces in reverse order (with the most specific part first), separated by dots, and adds "@domain" to the end. |
java.lang.String |
getDomainPart()
|
(package private) java.lang.String |
getFullString()
|
java.lang.String |
getLocalPart()
|
java.lang.String |
getLocalPieceAt(int index)
|
int |
getNumLocalPieces()
|
java.lang.String |
getNWOKeyName()
|
java.lang.String |
getOriginalString()
|
java.lang.String |
getReversedString()
Deprecated. use getBackwardString() instead |
int |
hashCode()
|
private void |
makeLocalPieces()
Helper method for constructors |
Category |
toCategory()
Gets the category corresponding to this location. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.lang.String m_fullString
private java.lang.String m_domainPart
private java.lang.String m_localPart
private java.lang.String m_originalString
private java.lang.String[] m_localPieces
public final char LOCAL_PART_SEPARATOR
| Constructor Detail |
public Location(java.lang.String locationString)
locationString - a string containing exactly one '@'
character
public Location(java.lang.String locationString,
java.lang.String defaultDomain)
locationString - a non-null string representing a locationdefaultDomain - a non-null string representing the default
domain for locations omitting the domain part.| Method Detail |
private void makeLocalPieces()
public java.lang.String getOriginalString()
java.lang.String getFullString()
public java.lang.String getBackwardString()
public java.lang.String getReversedString()
public java.lang.String getNWOKeyName()
public java.lang.String getLocalPart()
public java.lang.String getLocalPieceAt(int index)
public int getNumLocalPieces()
public java.lang.String getDomainPart()
public Location[] candidateKeyNames()
public Category toCategory()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||