@Deprecated public class DecoratorUtil extends Object
Decorator to create, and sort data with
decorators.
To create a new decorator, use one of the methods : newPropertyDecorator(Class, String)newJXPathDecorator(Class, String)newMultiJXPathDecorator(Class, String, String))newMultiJXPathDecorator(Class, String, String, String))JXPathDecorator, use the method
sort(JXPathDecorator, List, int).
| Constructor and Description |
|---|
DecoratorUtil()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static <O> JXPathDecorator.Context<O> |
createJXPathContext(String expression)
Deprecated.
|
static <O> JXPathDecorator.Context<O>[] |
createMultiJXPathContext(String expression,
String separator,
String separatorReplacement)
Deprecated.
|
protected static <O> JXPathDecorator.Context<O>[] |
newInstance(int size)
Deprecated.
|
static <O> JXPathDecorator<O> |
newJXPathDecorator(Class<O> type,
String expression)
Deprecated.
Factory method to instanciate a new
JXPathDecorator for the given
class internalClass and expression. |
static <O> MultiJXPathDecorator<O> |
newMultiJXPathDecorator(Class<O> type,
String expression,
String separator)
Deprecated.
|
static <O> MultiJXPathDecorator<O> |
newMultiJXPathDecorator(Class<O> type,
String expression,
String separator,
String separatorReplacement)
Deprecated.
|
static <O> PropertyDecorator<O> |
newPropertyDecorator(Class<O> type,
String property)
Deprecated.
Factory method to instanciate a new
PropertyDecorator for the
given class internlaClass and a readable property name. |
static <O> void |
sort(JXPathDecorator<O> decorator,
List<O> datas,
int pos)
Deprecated.
Sort a list of data based on the first token property of a given context
in a given decorator.
|
static <O> void |
sort(JXPathDecorator<O> decorator,
List<O> datas,
int pos,
boolean reverse)
Deprecated.
Sort a list of data based on the first token property of a given context
in a given decorator.
|
public static <O> PropertyDecorator<O> newPropertyDecorator(Class<O> type, String property) throws IllegalArgumentException, NullPointerException
PropertyDecorator for the
given class internlaClass and a readable property name.O - the generic type of class to be decorated by the new
decoratortype - the class of the objects decorated by the new
decoratorproperty - the propertyIllegalArgumentException - if the expression is not valid, says:
- a missing right brace was detected.
- a ${ was found in a jxpath token.NullPointerException - if type parameter is null.public static <O> JXPathDecorator<O> newJXPathDecorator(Class<O> type, String expression) throws IllegalArgumentException, NullPointerException
JXPathDecorator for the given
class internalClass and expression.O - the generic type of class to be decorated by the new
decoratortype - the class of the objects decorated by the new
decoratorexpression - the expression to use to decorated objectsIllegalArgumentException - if the expression is not valid, says:
- a missing right brace was detected.
- a ${ was found in a jxpath token.NullPointerException - if type parameter is null.public static <O> MultiJXPathDecorator<O> newMultiJXPathDecorator(Class<O> type, String expression, String separator) throws IllegalArgumentException, NullPointerException
public static <O> MultiJXPathDecorator<O> newMultiJXPathDecorator(Class<O> type, String expression, String separator, String separatorReplacement) throws IllegalArgumentException, NullPointerException
public static <O> void sort(JXPathDecorator<O> decorator, List<O> datas, int pos)
O - type of data to sortdecorator - the decorator to use to sortdatas - the list of data to sortpos - the index of context to used in decorator to obtain
sorted property.public static <O> void sort(JXPathDecorator<O> decorator, List<O> datas, int pos, boolean reverse)
O - type of data to sortdecorator - the decorator to use to sortdatas - the list of data to sortpos - the index of context to used in decorator to obtain
sorted property.reverse - flag to sort in reverse order if sets to truepublic static <O> JXPathDecorator.Context<O> createJXPathContext(String expression)
public static <O> JXPathDecorator.Context<O>[] createMultiJXPathContext(String expression, String separator, String separatorReplacement)
protected static <O> JXPathDecorator.Context<O>[] newInstance(int size)
Copyright © 2004-2013 CodeLutin. All Rights Reserved.