Class IterableOperationContributor
- java.lang.Object
-
- org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
-
- org.eclipse.epsilon.eol.execute.operations.contributors.IterableOperationContributor
-
- All Implemented Interfaces:
AutoCloseable
public class IterableOperationContributor extends OperationContributor
-
-
Field Summary
-
Fields inherited from class org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
cachedMethodNames
-
-
Constructor Summary
Constructors Constructor Description IterableOperationContributor()
IterableOperationContributor(Iterable<?> target)
-
Method Summary
-
Methods inherited from class org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
close, findContributedMethodForEvaluatedParameters, findContributedMethodForEvaluatedParameters, findContributedMethodForUnevaluatedParameters, getContext, getReflectionTarget, includeInheritedMethods, setContext, setTarget
-
-
-
-
Constructor Detail
-
IterableOperationContributor
public IterableOperationContributor()
-
IterableOperationContributor
public IterableOperationContributor(Iterable<?> target)
-
-
Method Detail
-
getTarget
protected Iterable<?> getTarget()
- Overrides:
getTarget
in classOperationContributor
- Returns:
- The
OperationContributor.target
field.
-
isCollection
protected boolean isCollection()
-
getCollection
protected Collection<Object> getCollection()
-
isList
protected boolean isList()
-
getList
protected List<?> getList()
-
isSet
protected boolean isSet()
-
getSet
protected Set<?> getSet()
-
contributesTo
public boolean contributesTo(Object target)
- Specified by:
contributesTo
in classOperationContributor
-
random
public Object random()
-
size
public int size()
-
at
public Object at(int index)
-
removeAt
public Object removeAt(int index)
-
asConcurrentBag
public EolConcurrentBag<Object> asConcurrentBag()
- Returns:
- Since:
- 2.1
-
asConcurrentSet
public EolConcurrentSet<Object> asConcurrentSet()
- Returns:
- Since:
- 2.1
-
asSequence
public EolSequence<Object> asSequence()
-
asOrderedSet
public EolOrderedSet<Object> asOrderedSet()
-
sum
public Number sum()
-
product
public Number product()
-
isEmpty
public boolean isEmpty()
-
notEmpty
public boolean notEmpty()
-
copy
protected <T> void copy(Iterable<T> source, Collection<T> target)
-
stream
public Stream<?> stream()
- Returns:
- Since:
- 2.1
-
parallelStream
public Stream<?> parallelStream()
- Returns:
- Since:
- 2.1
-
stream
protected Stream<?> stream(boolean parallel)
- Parameters:
parallel
-- Returns:
- Since:
- 2.1
-
clone
public Collection<?> clone()
-
includes
public boolean includes(Object key)
-
excludes
public boolean excludes(Object o)
-
includesAll
public boolean includesAll(Collection<?> col)
-
excludesAll
public boolean excludesAll(Collection<?> col)
-
count
public int count(Object o)
-
selectByKind
public Collection<Object> selectByKind(EolType type)
- Parameters:
type
-- Returns:
- Since:
- 2.1
-
selectByType
public Collection<Object> selectByType(EolType type)
- Parameters:
type
-- Returns:
- Since:
- 2.1
-
includingAll
public Collection<Object> includingAll(Collection<?> col)
-
including
public Collection<Object> including(Object o)
-
flatten
public Collection<Object> flatten()
TODO : See this- Returns:
-
excluding
public Collection<Object> excluding(Object o)
-
excludingAll
public Collection<Object> excludingAll(Collection<?> col)
-
first
public Collection<Object> first(int number)
-
first
public Object first()
-
second
public Object second()
-
third
public Object third()
-
fourth
public Object fourth()
-
last
public Object last()
-
indexOf
public int indexOf(Object o)
-
concat
public String concat()
-
max
public Number max()
-
min
public Number min()
-
invert
public Collection<Object> invert()
-
createCollection
public Collection<Object> createCollection()
-
-