Package org.xwiki.velocity.tools
Class CollectionsTool
- java.lang.Object
-
- org.apache.velocity.tools.generic.SafeConfig
-
- org.apache.velocity.tools.generic.CollectionTool
-
- org.xwiki.velocity.tools.CollectionTool
-
- org.xwiki.velocity.tools.CollectionsTool
-
- All Implemented Interfaces:
Serializable
@Deprecated public class CollectionsTool extends CollectionTool
Deprecated.since 12.1RC1, useCollectionTool
insteadVelocity Tool allowing to create various type of collections.- Since:
- 4.0M1
- Version:
- $Id: fdbc8a22fb1639ac671e86b10c07b5f543e16045 $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CollectionsTool()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <E> boolean
reverse(List<E> input)
Deprecated.Reverse the order of the elements within a list, so that the last element is moved to the beginning of the list, the next-to-last element to the second position, and so on.<E extends Comparable<E>>
booleansort(List<E> input)
Deprecated.Sort the elements within a list according to their natural order.-
Methods inherited from class org.xwiki.velocity.tools.CollectionTool
disjunction, getArrayList, getBlockingQueue, getLinkedList, getMap, getOrderedMap, getOrderedSet, getPriorityQueue, getQueue, getSet, getSortedMap, getSortedSet, intersection, reverseModifiable, sortModifiable, union, unmodifiable, unmodifiable, unmodifiable, unmodifiable
-
Methods inherited from class org.apache.velocity.tools.generic.CollectionTool
configure, getComparable, getStringsDelimiter, getStringsTrim, internalSort, setStringsDelimiter, setStringsTrim, sort, sort, sort, sort, sort, sort, sort, sort, sort, sort, sort, sort, split
-
-
-
-
Method Detail
-
reverse
public <E> boolean reverse(List<E> input)
Deprecated.Reverse the order of the elements within a list, so that the last element is moved to the beginning of the list, the next-to-last element to the second position, and so on. The input list is modified in place, so this operation will succeed only if the list is modifiable.- Type Parameters:
E
- the type of the elements in the list- Parameters:
input
- the list to reverse- Returns:
true
if the list was successfully reversed,false
otherwise
-
sort
public <E extends Comparable<E>> boolean sort(List<E> input)
Deprecated.Sort the elements within a list according to their natural order. The input list is modified in place, so this operation will succeed only if the list is modifiable.- Type Parameters:
E
- the type of the elements in the list- Parameters:
input
- the list to sort- Returns:
true
if the list was successfully sorted,false
otherwise
-
-