Record Class MatchIterable<T extends BigraphMatch<? extends Bigraph<?>>>
java.lang.Object
java.lang.Record
org.bigraphs.framework.simulation.matching.MatchIterable<T>
- Type Parameters:
T- type of the bigraph within aBigraphMatch"container" holding the match result
- All Implemented Interfaces:
Iterable<T>
public record MatchIterable<T extends BigraphMatch<? extends Bigraph<?>>>(Iterator<T extends BigraphMatch<? extends Bigraph<?>>> iterator)
extends Record
implements Iterable<T>
Custom iterable implementation for matches of type
BigraphMatch.- Author:
- Dominik Grzelak
-
Constructor Summary
ConstructorsConstructorDescriptionMatchIterable(Iterator<T> iterator) Creates an instance of aMatchIterablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <B extends Bigraph<? extends Signature<?>>>
MatchIterable<BigraphMatch<B>> final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iterator()Returns the value of theiteratorrecord component.static <B extends Bigraph<? extends Signature<?>>>
MatchIterable<BigraphMatch<B>> singletonMatches(BigraphMatch<B> match) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MatchIterable
Creates an instance of aMatchIterablerecord class.- Parameters:
iterator- the value for theiteratorrecord component
-
-
Method Details
-
emptyMatches
public static <B extends Bigraph<? extends Signature<?>>> MatchIterable<BigraphMatch<B>> emptyMatches() -
singletonMatches
public static <B extends Bigraph<? extends Signature<?>>> MatchIterable<BigraphMatch<B>> singletonMatches(BigraphMatch<B> match) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
iterator
Returns the value of theiteratorrecord component.- Specified by:
iteratorin interfaceIterable<T extends BigraphMatch<? extends Bigraph<?>>>- Returns:
- the value of the
iteratorrecord component
-