Class Selector

  extended by

public final class Selector
extends Object

A Selector object holds a CSS selector. To create a new Selector, call the static method Selector.createSelector(String selectorString). This class makes the Styles Object APIs clearer, since we have Map<Selector, Style> now instead of Map<String, Style>. Also with this object we'll have the API in place in case we need to hang methods off of this object (like possibily reordering the pseudo-classes in alphabetical order when creating a Selector object so that af|foo:bar:zoo and af|foo:zoo:bar are equal). It was originally thought that we'd add a getNativeSelectorString method here, but we decided to not add it here to keep a better separation of Selectors and the maps that convert the Selectors to the native selector string.

See Also:

Method Summary
static Selector createSelector(String selectorString)
          Given a String that represents the selector, return a Selector object
 boolean equals(Object obj)
 int hashCode()
 String toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail


public static Selector createSelector(String selectorString)
Given a String that represents the selector, return a Selector object

selectorString -
a Selector object
IllegalArgumentException - if selectorString is null or the empty String.


public String toString()
toString in class Object


public int hashCode()
hashCode in class Object


public boolean equals(Object obj)
equals in class Object

Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.