Record Class CachedFileStoreImpl<T>
java.lang.Object
java.lang.Record
net.fabricmc.loom.decompilers.cache.CachedFileStoreImpl<T>
- All Implemented Interfaces:
CachedFileStore<T>
public record CachedFileStoreImpl<T>(Path root, CachedFileStore.EntrySerializer<T> entrySerializer, CachedFileStoreImpl.CacheRules cacheRules)
extends Record
implements CachedFileStore<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe rules for the cache.Nested classes/interfaces inherited from interface net.fabricmc.loom.decompilers.cache.CachedFileStore
CachedFileStore.EntrySerializer<T> -
Constructor Summary
ConstructorsConstructorDescriptionCachedFileStoreImpl(Path root, CachedFileStore.EntrySerializer<T> entrySerializer, CachedFileStoreImpl.CacheRules cacheRules) Creates an instance of aCachedFileStoreImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecacheRulesrecord component.Returns the value of theentrySerializerrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable Tfinal inthashCode()Returns a hash code value for this object.voidprune()voidroot()Returns the value of therootrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedFileStoreImpl
public CachedFileStoreImpl(Path root, CachedFileStore.EntrySerializer<T> entrySerializer, CachedFileStoreImpl.CacheRules cacheRules) Creates an instance of aCachedFileStoreImplrecord class.- Parameters:
root- the value for therootrecord componententrySerializer- the value for theentrySerializerrecord componentcacheRules- the value for thecacheRulesrecord component
-
-
Method Details
-
getEntry
- Specified by:
getEntryin interfaceCachedFileStore<T>- Throws:
IOException
-
putEntry
- Specified by:
putEntryin interfaceCachedFileStore<T>- Throws:
IOException
-
prune
- Throws:
IOException
-
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). -
root
Returns the value of therootrecord component.- Returns:
- the value of the
rootrecord component
-
entrySerializer
Returns the value of theentrySerializerrecord component.- Returns:
- the value of the
entrySerializerrecord component
-
cacheRules
Returns the value of thecacheRulesrecord component.- Returns:
- the value of the
cacheRulesrecord component
-