Record Class CacheContext.OneToManyCacheContext<ID,EID,R,RC extends Collection<R>>
java.lang.Object
java.lang.Record
io.github.pellse.assembler.caching.CacheContext.OneToManyCacheContext<ID,EID,R,RC>
- All Implemented Interfaces:
CacheContext<ID,R, RC>
- Enclosing interface:
CacheContext<ID,R, RRC>
public static record CacheContext.OneToManyCacheContext<ID,EID,R,RC extends Collection<R>> (Function<R,EID> idResolver, IntFunction<Collector<R,?,Map<ID,RC extends Collection<R>>>> mapCollector, BiFunction<Map<ID,RC extends Collection<R>>,Map<ID,RC extends Collection<R>>,Map<ID,RC extends Collection<R>>> mapMerger, Comparator<R> idComparator, Supplier<RC extends Collection<R>> collectionFactory)
extends Record
implements CacheContext<ID,R,RC>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.pellse.assembler.caching.CacheContext
CacheContext.OneToManyCacheContext<ID,EID, R, RC extends Collection<R>>, CacheContext.OneToOneCacheContext<ID, R> -
Constructor Summary
ConstructorsConstructorDescriptionOneToManyCacheContext(Function<R, EID> idResolver, IntFunction<Collector<R, ?, Map<ID, RC>>> mapCollector, BiFunction<Map<ID, RC>, Map<ID, RC>, Map<ID, RC>> mapMerger, Comparator<R> idComparator, Supplier<RC> collectionFactory) Creates an instance of aOneToManyCacheContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecollectionFactoryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theidComparatorrecord component.Returns the value of theidResolverrecord component.Returns the value of themapCollectorrecord component.Returns the value of themapMergerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OneToManyCacheContext
public OneToManyCacheContext(Function<R, EID> idResolver, IntFunction<Collector<R, ?, Map<ID, RC>>> mapCollector, BiFunction<Map<ID, RC>, Map<ID, RC>, Map<ID, RC>> mapMerger, Comparator<R> idComparator, Supplier<RC> collectionFactory) Creates an instance of aOneToManyCacheContextrecord class.- Parameters:
idResolver- the value for theidResolverrecord componentmapCollector- the value for themapCollectorrecord componentmapMerger- the value for themapMergerrecord componentidComparator- the value for theidComparatorrecord componentcollectionFactory- the value for thecollectionFactoryrecord component
-
-
Method Details
-
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). -
idResolver
Returns the value of theidResolverrecord component.- Returns:
- the value of the
idResolverrecord component
-
mapCollector
Returns the value of themapCollectorrecord component.- Specified by:
mapCollectorin interfaceCacheContext<ID,EID, R> - Returns:
- the value of the
mapCollectorrecord component
-
mapMerger
Returns the value of themapMergerrecord component.- Specified by:
mapMergerin interfaceCacheContext<ID,EID, R> - Returns:
- the value of the
mapMergerrecord component
-
idComparator
Returns the value of theidComparatorrecord component.- Returns:
- the value of the
idComparatorrecord component
-
collectionFactory
Returns the value of thecollectionFactoryrecord component.- Returns:
- the value of the
collectionFactoryrecord component
-