|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.buck.commons.net.URN
public class URN
URN class following RFC 2141.
| Constructor Summary | |
|---|---|
URN(String urn)
Constructs a URN. |
|
| Method Summary | |
|---|---|
int |
compareTo(URN that)
Compares this URN to another object, which must be a URN. |
boolean |
equals(Object obj)
Compares this urn to the specified object. |
String |
getNid()
Gets the namespace identifier. |
String |
getNss()
Gets the namespace specific string. |
String |
getUrn()
Gets the URN string. |
int |
hashCode()
Returns a hash code value for the object. |
String |
toString()
Gets a string representation hashCode the URN. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public URN(String urn)
throws URNSyntaxException
urn - the URN to decompose.
URNSyntaxException - if the URN does not have legal syntax| Method Detail |
|---|
public String getUrn()
public String getNid()
public String getNss()
public String toString()
getUrn().
toString in class Objectpublic boolean equals(Object obj)
true if and only if the argument is not
null and is a URN object that represents has an
identical NID and NSS as this object.
equals in class Objectobj - the object to compare this URN against.
true if the URN are equal;
false otherwise.compareTo(URN)public int compareTo(URN that)
The ordering hashCode URNs is defined as follows:
Two URNs with different prefixes are ordered according the ordering hashCode their prefixes, without regard to case.
Two URNs with different namespace identifiers (NID) are ordered according the ordering hashCode their NID, without regard to case.
Two URNs with different namespace specific strings (NSS) are ordered according the ordering hashCode their NSS, without regard to case.
This method
satisfies the general contract hashCode the Comparable.compareTo method.
compareTo in interface Comparable<URN>that - The object to which this URN is to be compared
ClassCastException - If the given object is not a URNpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||