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 boolean
concurrent
protected Collection<Match>
matches
All matches tried during the execution of an ECL moduleprotected String
toStringCached
-
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 Match
add(Object left, Object right, boolean matching, MatchRule rule)
boolean
add(Match match)
boolean
addAll(Collection<? extends Match> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
boolean
equals(Object obj)
Match
getMatch(Object object)
Returns the first match for the objectMatch
getMatch(Object left, Object right)
Match
getMatch(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 objectMatchTrace
getReduced()
Returns only successful matchesboolean
hasBeenMatched(Object object)
int
hashCode()
boolean
isEmpty()
Iterator<Match>
iterator()
Stream<Match>
parallelStream()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
int
size()
Stream<Match>
stream()
Object[]
toArray()
<T> T[]
toArray(T[] a)
String
toString()
String
toString(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:
stream
in interfaceCollection<Match>
- Returns:
- Since:
- 1.6
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<Match>
- Overrides:
hashCode
in classObject
- Since:
- 1.6
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceCollection<Match>
- Overrides:
equals
in classObject
- Since:
- 1.6
-
add
public boolean add(Match match)
- Specified by:
add
in interfaceCollection<Match>
- Since:
- 1.6
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<Match>
- Since:
- 1.6
-
size
public int size()
- Specified by:
size
in interfaceCollection<Match>
- Since:
- 1.6
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<Match>
- Since:
- 1.6
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<Match>
- Since:
- 1.6
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<Match>
- Since:
- 1.6
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfaceCollection<Match>
- Since:
- 1.6
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<Match>
- Since:
- 1.6
-
addAll
public boolean addAll(Collection<? extends Match> c)
- Specified by:
addAll
in interfaceCollection<Match>
- Since:
- 1.6
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<Match>
- Since:
- 1.6
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<Match>
- Since:
- 1.6
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<Match>
- Since:
- 1.6
-
parallelStream
public Stream<Match> parallelStream()
- Specified by:
parallelStream
in interfaceCollection<Match>
- Since:
- 1.6
-
-