org.apache.myfaces.trinidad.style

## Class Selector

- java.lang.Object
- - org.apache.myfaces.trinidad.style.Selector

-     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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - #### createSelector

          public static Selector createSelector(String selectorString)

      Given a String that represents the selector, return a Selector object
      Parameters:
        `selectorString` -
      Returns:
        a Selector object
      Throws:
        `IllegalArgumentException` - if selectorString is null or the empty String.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

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