com.guiseframework.platform.web.css
Class IDSelector

java.lang.Object
  extended by com.guiseframework.platform.web.css.IDSelector
All Implemented Interfaces:
SimpleSelector, java.lang.Comparable<IDSelector>

public class IDSelector
extends java.lang.Object
implements SimpleSelector, java.lang.Comparable<IDSelector>

An ID simple selector.

Author:
Garret Wilson

Constructor Summary
IDSelector(java.lang.String id)
          ID constructor.
 
Method Summary
 int compareTo(IDSelector object)
          Compares this object with the specified object for order.
 boolean equals(java.lang.Object object)
          Determines whether this object is equivalent to another object.
 java.lang.String getID()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IDSelector

public IDSelector(java.lang.String id)
ID constructor.

Parameters:
id - The ID to be selected.
Throws:
java.lang.NullPointerException - if the given ID is null.
Method Detail

getID

public java.lang.String getID()
Returns:
The ID to be selected.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
A hash code for this object.

equals

public boolean equals(java.lang.Object object)
Determines whether this object is equivalent to another object.

Overrides:
equals in class java.lang.Object
Parameters:
object - The object to compare with this object.
Returns:
true if this object is equivalent to the given object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.

compareTo

public int compareTo(IDSelector object)
Compares this object with the specified object for order. This implementation compares IDs. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface java.lang.Comparable<IDSelector>
Parameters:
object - The object to be compared.
Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.