Package org.eclipse.epsilon.ecl.trace
Class MatchTrace
- java.lang.Object
-
- org.eclipse.epsilon.ecl.trace.MatchTrace
-
- All Implemented Interfaces:
Iterable<Match>,Collection<Match>
public class MatchTrace extends Object implements Collection<Match>
- Since:
- 1.6 Can be accessed through Collection API rather than getMatches for convenience
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanconcurrentprotected Collection<Match>matchesAll matches tried during the execution of an ECL moduleprotected StringtoStringCached
-
Constructor Summary
Constructors Constructor Description MatchTrace()MatchTrace(boolean concurrent)MatchTrace(MatchTrace copy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Matchadd(Object left, Object right, boolean matching, MatchRule rule)booleanadd(Match match)booleanaddAll(Collection<? extends Match> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object obj)MatchgetMatch(Object object)Returns the first match for the objectMatchgetMatch(Object left, Object right)MatchgetMatch(Object left, MatchRule rule)Collection<Match>getMatches()Returns all matches, both successful and pairs that have been compared but do not matchCollection<Match>getMatches(Object object)Returns all the matches for a given objectMatchTracegetReduced()Returns only successful matchesbooleanhasBeenMatched(Object object)inthashCode()booleanisEmpty()Iterator<Match>iterator()Stream<Match>parallelStream()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Stream<Match>stream()Object[]toArray()<T> T[]toArray(T[] a)StringtoString()StringtoString(IEolContext context)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
removeIf, spliterator, toArray
-
-
-
-
Field Detail
-
matches
protected Collection<Match> matches
All matches tried during the execution of an ECL module
-
concurrent
protected boolean concurrent
-
toStringCached
protected String toStringCached
-
-
Constructor Detail
-
MatchTrace
public MatchTrace()
-
MatchTrace
public MatchTrace(boolean concurrent)
-
MatchTrace
public MatchTrace(MatchTrace copy)
-
-
Method Detail
-
getReduced
public MatchTrace getReduced()
Returns only successful matches
-
getMatches
public Collection<Match> getMatches(Object object)
Returns all the matches for a given object- Parameters:
object-- Returns:
-
getMatch
public Match getMatch(Object object)
Returns the first match for the object- Parameters:
object-- Returns:
-
hasBeenMatched
public boolean hasBeenMatched(Object object)
-
toString
public String toString(IEolContext context)
-
getMatches
public Collection<Match> getMatches()
Returns all matches, both successful and pairs that have been compared but do not match- Returns:
-
stream
public Stream<Match> stream()
- Specified by:
streamin interfaceCollection<Match>- Returns:
- Since:
- 1.6
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<Match>- Overrides:
hashCodein classObject- Since:
- 1.6
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceCollection<Match>- Overrides:
equalsin classObject- Since:
- 1.6
-
add
public boolean add(Match match)
- Specified by:
addin interfaceCollection<Match>- Since:
- 1.6
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<Match>- Since:
- 1.6
-
size
public int size()
- Specified by:
sizein interfaceCollection<Match>- Since:
- 1.6
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<Match>- Since:
- 1.6
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<Match>- Since:
- 1.6
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<Match>- Since:
- 1.6
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<Match>- Since:
- 1.6
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<Match>- Since:
- 1.6
-
addAll
public boolean addAll(Collection<? extends Match> c)
- Specified by:
addAllin interfaceCollection<Match>- Since:
- 1.6
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<Match>- Since:
- 1.6
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<Match>- Since:
- 1.6
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<Match>- Since:
- 1.6
-
parallelStream
public Stream<Match> parallelStream()
- Specified by:
parallelStreamin interfaceCollection<Match>- Since:
- 1.6
-
-