public class LookupTableAssetMap
Class LookupTableAssetMap. Provides lookuptableassetmap functionality for the Hytale server.
java.lang.Object > LookupTableAssetMap
Field Summary
array
private
T[]
array
Field array.
key
final
K
key
Field key.
index
final
int
index
Field index.
value
final
T
value
Field value.
remove
final
Set
remove
Field remove.
blockId
final
int
blockId
Field blockId.
length
final
int
length
Field length.
newArray
final
T[]
newArray
Field newArray.
Method Detail
LookupTableAssetMap
public
public
LookupTableAssetMap
(@Nonnull final IntFunction arrayProvider, final ToIntFunction indexGetter, final IntSupplier maxIndexGetter)
Method LookupTableAssetMap.
- Parameters:
@Nonnull final IntFunctionarrayProviderfinal ToIntFunctionindexGetterfinal IntSuppliermaxIndexGetter
getAsset
public
T
getAsset
(final int index)
Method getAsset.
- Parameters:
final intindex
getAssetOrDefault
public
T
getAssetOrDefault
(final int index, final T def)
Method getAssetOrDefault.
- Parameters:
final intindexfinal Tdef
clear
protected
void
clear
()
Method clear.
putAll
protected
void
putAll
(@Nonnull final String packKey, @Nonnull final AssetCodec codec, @Nonnull final Map loadedAssets, @Nonnull final Map loadedKeyToPathMap, @Nonnull final Map> loadedAssetChildren)
Method putAll.
- Parameters:
@Nonnull final StringpackKey@Nonnull final AssetCodeccodec@Nonnull final MaploadedAssets@Nonnull final MaploadedKeyToPathMap@Nonnull final MaploadedAssetChildren>
remove
protected
Set
remove
(@Nonnull final Set keys)
Method remove.
- Parameters:
@Nonnull final Setkeys
remove0
private
void
remove0
(@Nonnull final Set keys)
Method remove0.
- Parameters:
@Nonnull final Setkeys
resize
private
void
resize
()
Method resize.
if
public
else
if
(length < this.array.length)
Method if.
- Parameters:
length <this.array.length
requireReplaceOnRemove
public
boolean
requireReplaceOnRemove
()
Method requireReplaceOnRemove.