Package com.xpn.xwiki.criteria.impl
Class RangeFactory
- java.lang.Object
-
- com.xpn.xwiki.criteria.impl.RangeFactory
-
public class RangeFactory extends Object
Helper factory class for creating Range objects in velocity
-
-
Field Summary
Fields Modifier and Type Field Description static Range
ALL
The interval that matches the entire list it is applied to.static Range
FIRST
The interval that matches just the first element of the list it is applied to.static Range
LAST
The interval that matches just the last element of the list it is applied to.
-
Constructor Summary
Constructors Constructor Description RangeFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Range
createAllRange()
Creates a new Range which matches all the elements of the list it is applied to.static Range
createHeadRange(int size)
Creates a new Range starting from 0 and having the specified size.static Range
createRange(int start, int size)
static Range
createTailRange(int size)
Creates a new Range starting from the end of the list it is applied to and having the specified size.static Range
getALL()
Helper method for accessingALL
static field in velocitystatic Range
getFIRST()
Helper method for accessingFIRST
static field in velocitystatic Range
getLAST()
Helper method for accessingLAST
static field in velocity
-
-
-
Field Detail
-
ALL
public static final Range ALL
The interval that matches the entire list it is applied to.
-
FIRST
public static final Range FIRST
The interval that matches just the first element of the list it is applied to.
-
LAST
public static final Range LAST
The interval that matches just the last element of the list it is applied to.
-
-
Method Detail
-
createRange
public static Range createRange(int start, int size)
- See Also:
Range(int, int)
-
createAllRange
public static Range createAllRange()
Creates a new Range which matches all the elements of the list it is applied to.- Returns:
- A new Range instance
-
createHeadRange
public static Range createHeadRange(int size)
Creates a new Range starting from 0 and having the specified size. It matches the firstsize
elements of the list it is applied to.- Parameters:
size
- The size of the interval- Returns:
- A new Range instance
-
createTailRange
public static Range createTailRange(int size)
Creates a new Range starting from the end of the list it is applied to and having the specified size. It matches the lastsize
elements of the list.- Parameters:
size
- The size of the interval- Returns:
- A new Range instance
-
-