Record Class CacheContext.OneToManyCacheContext<ID,EID,R,RC extends Collection<R>>
java.lang.Object
java.lang.Record
io.github.pellse.assembler.caching.factory.CacheContext.OneToManyCacheContext<ID,EID,R,RC>
- All Implemented Interfaces:
CacheContext<ID,
R, RC, CacheContext.OneToManyCacheContext<ID, EID, R, RC>>
- Enclosing interface:
CacheContext<ID,
R, RRC, CTX extends CacheContext<ID, R, RRC, CTX>>
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, Comparator<R> idComparator, Supplier<RC extends Collection<R>> collectionFactory, Class<RC extends Collection<R>> collectionType, MergeFunction<ID,RC extends Collection<R>> mergeFunction, CacheFactory.CacheTransformer<ID,R,RC extends Collection<R>,CacheContext.OneToManyCacheContext<ID,EID,R,RC extends Collection<R>>> cacheTransformer)
extends Record
implements CacheContext<ID,R,RC,CacheContext.OneToManyCacheContext<ID,EID,R,RC>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.pellse.assembler.caching.factory.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, Comparator<R> idComparator, Supplier<RC> collectionFactory, Class<RC> collectionType, MergeFunction<ID, RC> mergeFunction, CacheFactory.CacheTransformer<ID, R, RC, CacheContext.OneToManyCacheContext<ID, EID, R, RC>> cacheTransformer) Creates an instance of aOneToManyCacheContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecacheTransformer
record component.Returns the value of thecollectionFactory
record component.Returns the value of thecollectionType
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theidComparator
record component.Returns the value of theidResolver
record component.Returns the value of themapCollector
record component.Returns the value of themergeFunction
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.pellse.assembler.caching.factory.CacheContext
mapMerger
-
Constructor Details
-
OneToManyCacheContext
public OneToManyCacheContext(Function<R, EID> idResolver, IntFunction<Collector<R, ?, Map<ID, RC>>> mapCollector, Comparator<R> idComparator, Supplier<RC> collectionFactory, Class<RC> collectionType, MergeFunction<ID, RC> mergeFunction, CacheFactory.CacheTransformer<ID, R, RC, CacheContext.OneToManyCacheContext<ID, EID, R, RC>> cacheTransformer) Creates an instance of aOneToManyCacheContext
record class.- Parameters:
idResolver
- the value for theidResolver
record componentmapCollector
- the value for themapCollector
record componentidComparator
- the value for theidComparator
record componentcollectionFactory
- the value for thecollectionFactory
record componentcollectionType
- the value for thecollectionType
record componentmergeFunction
- the value for themergeFunction
record componentcacheTransformer
- the value for thecacheTransformer
record 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 theidResolver
record component.- Returns:
- the value of the
idResolver
record component
-
mapCollector
Returns the value of themapCollector
record component.- Specified by:
mapCollector
in interfaceCacheContext<ID,
EID, R, RC extends Collection<R>> - Returns:
- the value of the
mapCollector
record component
-
idComparator
Returns the value of theidComparator
record component.- Returns:
- the value of the
idComparator
record component
-
collectionFactory
Returns the value of thecollectionFactory
record component.- Returns:
- the value of the
collectionFactory
record component
-
collectionType
Returns the value of thecollectionType
record component.- Returns:
- the value of the
collectionType
record component
-
mergeFunction
Returns the value of themergeFunction
record component.- Specified by:
mergeFunction
in interfaceCacheContext<ID,
EID, R, RC extends Collection<R>> - Returns:
- the value of the
mergeFunction
record component
-
cacheTransformer
public CacheFactory.CacheTransformer<ID,R, cacheTransformer()RC, CacheContext.OneToManyCacheContext<ID, EID, R, RC>> Returns the value of thecacheTransformer
record component.- Specified by:
cacheTransformer
in interfaceCacheContext<ID,
EID, R, RC extends Collection<R>> - Returns:
- the value of the
cacheTransformer
record component
-