public class Url extends Object implements Comparable<Url>
Objects represents a URL and its category.
Constructor and Description |
---|
Url() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Url pn)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
|
boolean |
equals(Url obj)
Determines whether the specified Object is equal to the current Object.
|
boolean |
equals(Url x,
Url y)
Determines whether the specified object instances are considered equal.
|
UrlCategory |
getCategory()
Gets or sets an object category
|
String |
getHref()
Gets or sets a URL
|
boolean |
getPrefered()
Gets or sets a value which defines whether object is preferred.
|
int |
hashCode()
GetHashCode returns a hash function for this object.
|
int |
hashCode(Url obj)
GetHashCode returns a hash function for specified object.
|
static boolean |
op_Equality(Url a,
Url b)
Determines whether the specified objects are equal.
|
static boolean |
op_Inequality(Url a,
Url b)
Determines whether the specified objects are not equal.
|
void |
setCategory(UrlCategory value)
Gets or sets an object category
|
void |
setHref(String value)
Gets or sets a URL
|
void |
setPrefered(boolean value)
Gets or sets a value which defines whether object is preferred.
|
String |
toString()
Returns a string that represents the current object.
|
public final boolean getPrefered()
Gets or sets a value which defines whether object is preferred.
public final void setPrefered(boolean value)
Gets or sets a value which defines whether object is preferred.
public final UrlCategory getCategory()
Gets or sets an object category
public final void setCategory(UrlCategory value)
Gets or sets an object category
public final String getHref()
Gets or sets a URL
public final void setHref(String value)
Gets or sets a URL
public String toString()
Returns a string that represents the current object.
public int hashCode()
GetHashCode returns a hash function for this object.
public int hashCode(Url obj)
GetHashCode returns a hash function for specified object.
obj
- The Object for which a hash code is to be returned.public final boolean equals(Url obj)
Determines whether the specified Object is equal to the current Object.
obj
- The Object to compare with the current Object.public final boolean equals(Url x, Url y)
Determines whether the specified object instances are considered equal.
x
- The first object to compare.y
- The second object to compare.public static boolean op_Equality(Url a, Url b)
Determines whether the specified objects are equal.
a
- First object to compareb
- Second object to comparepublic static boolean op_Inequality(Url a, Url b)
Determines whether the specified objects are not equal.
a
- First object to compareb
- Second object to comparepublic int compareTo(Url pn)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
compareTo
in interface Comparable<Url>
obj
- An object to compare with this instance, or null.