org.nuiton.util.decorator
Class MultiJXPathDecorator<O>

java.lang.Object
  extended by org.nuiton.util.decorator.Decorator<O>
      extended by org.nuiton.util.decorator.JXPathDecorator<O>
          extended by org.nuiton.util.decorator.MultiJXPathDecorator<O>
Type Parameters:
O - type of data to decorate
All Implemented Interfaces:
Serializable

public class MultiJXPathDecorator<O>
extends JXPathDecorator<O>

JXPathDecorator implementation with multiple contexts.

Since:
2.3
Author:
tchemit
See Also:
Decorator, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.nuiton.util.decorator.JXPathDecorator
JXPathDecorator.Context<O>, JXPathDecorator.JXPathComparator<O>
 
Field Summary
protected  JXPathDecorator.Context<O>[] contexts
          Contexts of the decorator
protected  String separator
          context separator
protected  String separatorReplacement
          context separator replacement
 
Fields inherited from class org.nuiton.util.decorator.JXPathDecorator
context, initialExpression, nbToken
 
Fields inherited from class org.nuiton.util.decorator.Decorator
type
 
Constructor Summary
protected MultiJXPathDecorator(Class<O> internalClass, String expression, String separator, String separatorReplacement)
           
protected MultiJXPathDecorator(Class<O> internalClass, String expression, String separator, String separatorReplacement, JXPathDecorator.Context<O>[] contexts)
           
 
Method Summary
protected  void ensureContextIndex(MultiJXPathDecorator<?> decorator, int pos)
           
protected  Comparator<O> getComparator(int pos)
           
 int getNbContext()
           
 String getSeparator()
           
 String getSeparatorReplacement()
           
 void setContextIndex(int index)
           
 
Methods inherited from class org.nuiton.util.decorator.JXPathDecorator
ensureTokenIndex, getExpression, getInitialExpression, getNbToken, getProperty, getTokens, getTokenValue, setContext, toString, toString
 
Methods inherited from class org.nuiton.util.decorator.Decorator
getInternalClass, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

contexts

protected JXPathDecorator.Context<O>[] contexts
Contexts of the decorator


separator

protected String separator
context separator


separatorReplacement

protected String separatorReplacement
context separator replacement

Constructor Detail

MultiJXPathDecorator

protected MultiJXPathDecorator(Class<O> internalClass,
                               String expression,
                               String separator,
                               String separatorReplacement,
                               JXPathDecorator.Context<O>[] contexts)
                        throws IllegalArgumentException,
                               NullPointerException
Throws:
IllegalArgumentException
NullPointerException

MultiJXPathDecorator

protected MultiJXPathDecorator(Class<O> internalClass,
                               String expression,
                               String separator,
                               String separatorReplacement)
                        throws IllegalArgumentException,
                               NullPointerException
Throws:
IllegalArgumentException
NullPointerException
Method Detail

setContextIndex

public void setContextIndex(int index)

getNbContext

public int getNbContext()

getSeparator

public String getSeparator()

getSeparatorReplacement

public String getSeparatorReplacement()

getComparator

protected Comparator<O> getComparator(int pos)
Overrides:
getComparator in class JXPathDecorator<O>

ensureContextIndex

protected void ensureContextIndex(MultiJXPathDecorator<?> decorator,
                                  int pos)


Copyright © 2004-2011 CodeLutin. All Rights Reserved.