Class LookupTableAssetMap<K,T extends JsonAssetWithMap<K,LookupTableAssetMap<K,T>>>
java.lang.Object
com.hypixel.hytale.assetstore.AssetMap<K,T>
com.hypixel.hytale.assetstore.map.DefaultAssetMap<K,T>
com.hypixel.hytale.assetstore.map.AssetMapWithIndexes<K,T>
com.hypixel.hytale.assetstore.map.LookupTableAssetMap<K,T>
public class LookupTableAssetMap<K,T extends JsonAssetWithMap<K,LookupTableAssetMap<K,T>>>
extends AssetMapWithIndexes<K,T>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hypixel.hytale.assetstore.map.DefaultAssetMap
DefaultAssetMap.AssetRef<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate T[]private final ReentrantLockprivate final IntFunction<T[]> private final ToIntFunction<K> private final IntSupplierFields inherited from class com.hypixel.hytale.assetstore.map.AssetMapWithIndexes
indexedTagStorage, NOT_FOUND, unmodifiableIndexedTagStorageFields inherited from class com.hypixel.hytale.assetstore.map.DefaultAssetMap
assetChainMap, assetChildren, assetMap, assetMapLock, DEFAULT_PACK_KEY, EMPTY_PAIR_ARRAY, packAssetKeys, pathToKeyMap, tagStorage, unmodifiableTagKeys, unmodifiableTagStorage -
Constructor Summary
ConstructorsConstructorDescriptionLookupTableAssetMap(IntFunction<T[]> arrayProvider, ToIntFunction<K> indexGetter, IntSupplier maxIndexGetter) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclear()getAsset(int index) getAssetOrDefault(int index, T def) protected voidputAll(String packKey, AssetCodec<K, T> codec, Map<K, T> loadedAssets, Map<K, Path> loadedKeyToPathMap, Map<K, Set<K>> loadedAssetChildren) private voidbooleanprivate voidresize()Methods inherited from class com.hypixel.hytale.assetstore.map.AssetMapWithIndexes
getIndexesForTag, putAssetTag, putAssetTag, putAssetTagsMethods inherited from class com.hypixel.hytale.assetstore.map.DefaultAssetMap
getAsset, getAsset, getAssetCount, getAssetMap, getAssetPack, getChildren, getKeys, getKeysForPack, getKeysForTag, getPath, getPathMap, getTagCount, getTagIndexes, putAssetTag
-
Field Details
-
arrayProvider
@Nonnull private final IntFunction<T extends JsonAssetWithMap<K,LookupTableAssetMap<K, arrayProviderT>>[]> -
indexGetter
-
maxIndexGetter
-
arrayLock
-
array
-
-
Constructor Details
-
LookupTableAssetMap
public LookupTableAssetMap(@Nonnull IntFunction<T[]> arrayProvider, ToIntFunction<K> indexGetter, IntSupplier maxIndexGetter)
-
-
Method Details
-
getAsset
-
getAssetOrDefault
-
clear
protected void clear()- Overrides:
clearin classAssetMapWithIndexes<K,T extends JsonAssetWithMap<K, LookupTableAssetMap<K, T>>>
-
putAll
protected void putAll(@Nonnull String packKey, @Nonnull AssetCodec<K, T> codec, @Nonnull Map<K, T> loadedAssets, @Nonnull Map<K, Path> loadedKeyToPathMap, @Nonnull Map<K, Set<K>> loadedAssetChildren) - Overrides:
putAllin classDefaultAssetMap<K,T extends JsonAssetWithMap<K, LookupTableAssetMap<K, T>>>
-
remove
- Overrides:
removein classDefaultAssetMap<K,T extends JsonAssetWithMap<K, LookupTableAssetMap<K, T>>>
-
remove
protected Set<K> remove(@Nonnull String packKey, @Nonnull Set<K> keys, @Nonnull List<Map.Entry<String, Object>> pathsToReload) - Overrides:
removein classDefaultAssetMap<K,T extends JsonAssetWithMap<K, LookupTableAssetMap<K, T>>>
-
remove0
-
resize
private void resize() -
requireReplaceOnRemove
public boolean requireReplaceOnRemove()- Overrides:
requireReplaceOnRemovein classAssetMapWithIndexes<K,T extends JsonAssetWithMap<K, LookupTableAssetMap<K, T>>>
-