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