public class IterableElementIndexTransformer extends Object implements Lookup, org.apache.commons.collections.Transformer
Iterable
[B,A,C,B] return a Map of Position of the elements in the index {B:0, A:1, C:2}trackMultipleIndeces
is false; the last encountered index will be the one that is counted.trackMultipleIndeces
is true then [B,A,C,B] --> {B:[0,3], A:[1], C:[2]} will be returnedIterable
input however the order relies on assumption that the input has a consistent order.
In practice this is safest to use with List
'sConstructor and Description |
---|
IterableElementIndexTransformer() |
Modifier and Type | Method and Description |
---|---|
boolean |
isTrackMultipleIndeces()
If true, will return a Map with List of indeces for each element
|
void |
setTrackMultipleIndeces(boolean trackMultipleIndeces)
If true, will return a Map with List of indeces for each element
|
Object |
transform(Object input)
For a Given String, Lookup a value for it
|
public Object transform(Object input)
Lookup
public boolean isTrackMultipleIndeces()
public void setTrackMultipleIndeces(boolean trackMultipleIndeces)
Copyright © 2018. All rights reserved.