Class AssetCollection<T extends PackAsset>
- java.lang.Object
-
- dev.linwood.itemmods.pack.collection.AssetCollection<T>
-
- Direct Known Subclasses:
SavedAssetCollection
public class AssetCollection<T extends PackAsset> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<T>
assets
protected ItemModsPack
parent
-
Constructor Summary
Constructors Constructor Description AssetCollection(ItemModsPack parent)
AssetCollection(ItemModsPack parent, java.util.Set<T> assets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
T
getAsset(java.lang.String name)
java.util.Set<T>
getAssets()
java.util.List<T>
getAssetsAsList()
void
registerAsset(T asset)
void
reload()
java.util.stream.Stream<T>
stream()
void
unregisterAsset(java.lang.String assetName)
-
-
-
Field Detail
-
parent
protected final ItemModsPack parent
-
-
Constructor Detail
-
AssetCollection
public AssetCollection(ItemModsPack parent) throws java.io.IOException
- Throws:
java.io.IOException
-
AssetCollection
public AssetCollection(ItemModsPack parent, java.util.Set<T> assets) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getAssets
public java.util.Set<T> getAssets()
-
getAssetsAsList
public java.util.List<T> getAssetsAsList()
-
registerAsset
public void registerAsset(T asset)
-
getAsset
public T getAsset(java.lang.String name)
-
unregisterAsset
public void unregisterAsset(java.lang.String assetName)
-
stream
public java.util.stream.Stream<T> stream()
-
reload
public void reload() throws java.io.IOException
- Throws:
java.io.IOException
-
clear
public void clear()
-
-