Class SavedAssetCollection<T extends PackAsset>
- java.lang.Object
-
- dev.linwood.itemmods.pack.collection.AssetCollection<T>
-
- dev.linwood.itemmods.pack.collection.SavedAssetCollection<T>
-
- Direct Known Subclasses:
ExportedAssetCollection
public class SavedAssetCollection<T extends PackAsset> extends AssetCollection<T>
-
-
Field Summary
-
Fields inherited from class dev.linwood.itemmods.pack.collection.AssetCollection
assets, parent
-
-
Constructor Summary
Constructors Constructor Description SavedAssetCollection(ItemModsPack parent, java.lang.String directoryName, java.util.function.BiFunction<java.lang.String,com.google.gson.JsonElement,T> assetFactory)
SavedAssetCollection(ItemModsPack parent, java.util.Set<T> assets, java.lang.String directoryName, java.util.function.BiFunction<java.lang.String,com.google.gson.JsonElement,T> assetFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createDirectory()
java.nio.file.Path
getDirectoryPath()
void
reload()
void
save()
void
save(T asset)
-
Methods inherited from class dev.linwood.itemmods.pack.collection.AssetCollection
clear, getAsset, getAssets, getAssetsAsList, registerAsset, stream, unregisterAsset
-
-
-
-
Constructor Detail
-
SavedAssetCollection
public SavedAssetCollection(ItemModsPack parent, @Nullable java.lang.String directoryName, java.util.function.BiFunction<java.lang.String,com.google.gson.JsonElement,T> assetFactory) throws java.io.IOException
- Throws:
java.io.IOException
-
SavedAssetCollection
public SavedAssetCollection(ItemModsPack parent, java.util.Set<T> assets, @Nullable java.lang.String directoryName, java.util.function.BiFunction<java.lang.String,com.google.gson.JsonElement,T> assetFactory) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getDirectoryPath
public java.nio.file.Path getDirectoryPath()
-
reload
public void reload() throws java.io.IOException
- Overrides:
reload
in classAssetCollection<T extends PackAsset>
- Throws:
java.io.IOException
-
createDirectory
public void createDirectory() throws java.io.IOException
- Throws:
java.io.IOException
-
save
public void save(T asset) throws java.io.IOException
- Throws:
java.io.IOException
-
save
public void save()
-
-