org.joox
Class JOOX

java.lang.Object
  extended by org.joox.JOOX

public final class JOOX
extends Object

Author:
Lukas Eder

Constructor Summary
JOOX()
           
 
Method Summary
static Filter all()
          A filter that always returns true
static Filter and(Filter... filters)
          Combine filters
static Mapper<String> attributes(String attributeName)
          Create a mapper that returns all attributes with a given name
static DocumentBuilder builder()
          Get a document builder
static Content content(String value)
          Get a constant content that returns the same value for all elements.
static Filter even()
          A filter that returns true on all even indexes (starting with 0!)
static Mapper<String> ids()
          Create a mapper that returns all id attributes
static Filter ids(String... ids)
          Create a filter matching id attributes
static Iterable<Element> iterable(NodeList elements)
          Wrap a NodeList into an Iterable
static Iterator<Element> iterator(NodeList elements)
          Wrap a NodeList into an Iterator
static X joox()
          Create an empty jOOX X element set
static X joox(Document document)
          Wrap a DOM document in a jOOX X element set
static X joox(Element element)
          Wrap a DOM element in a jOOX X element set
static List<Element> list(NodeList elements)
          Wrap a NodeList into an List
static Filter none()
          A filter that always returns false
static Filter not(Filter filter)
          Inverse a filter
static Filter odd()
          A filter that returns true on all odd indexes (starting with 0!)
static Filter or(Filter... filters)
          Combine filters
static Filter selector(String selector)
          A filter that returns all elements matched by a given selector.
static Filter tag(String tagName)
          A filter that returns all elements with a given tag name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JOOX

public JOOX()
Method Detail

joox

public static X joox()
Create an empty jOOX X element set


joox

public static X joox(Document document)
Wrap a DOM document in a jOOX X element set


joox

public static X joox(Element element)
Wrap a DOM element in a jOOX X element set


builder

public static DocumentBuilder builder()
Get a document builder


none

public static Filter none()
A filter that always returns false


all

public static Filter all()
A filter that always returns true


even

public static Filter even()
A filter that returns true on all even indexes (starting with 0!)


odd

public static Filter odd()
A filter that returns true on all odd indexes (starting with 0!)


selector

public static Filter selector(String selector)
A filter that returns all elements matched by a given selector.

As of jOOX 0.9.0, this is the same as calling tag(String). More sophisticated selector expressions will be added in the future.


tag

public static Filter tag(String tagName)
A filter that returns all elements with a given tag name


and

public static Filter and(Filter... filters)
Combine filters


or

public static Filter or(Filter... filters)
Combine filters


not

public static Filter not(Filter filter)
Inverse a filter


ids

public static Filter ids(String... ids)
Create a filter matching id attributes


content

public static Content content(String value)
Get a constant content that returns the same value for all elements.


ids

public static Mapper<String> ids()
Create a mapper that returns all id attributes


attributes

public static Mapper<String> attributes(String attributeName)
Create a mapper that returns all attributes with a given name


iterable

public static Iterable<Element> iterable(NodeList elements)
Wrap a NodeList into an Iterable


iterator

public static Iterator<Element> iterator(NodeList elements)
Wrap a NodeList into an Iterator


list

public static List<Element> list(NodeList elements)
Wrap a NodeList into an List



Copyright © 2011. All Rights Reserved.