- java.lang.Object
-
- org.mal_lang.langspec.Category
-
public final class Category extends Object
Immutable class representing a category in a MAL language.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetgetAsset(String name)Returns the asset with the namenamein thisCategoryobject.List<Asset>getAssets()Returns a list of all assets in thisCategoryobject.MetagetMeta()Returns the meta info of thisCategoryobject.StringgetName()Returns the name of thisCategoryobject.booleanhasAsset(String name)Returns whethernameis the name of an asset in thisCategoryobject.
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of thisCategoryobject.- Returns:
- the name of this
Categoryobject - Since:
- 1.0.0
-
getMeta
public Meta getMeta()
Returns the meta info of thisCategoryobject.- Returns:
- the meta info of this
Categoryobject - Since:
- 1.0.0
-
hasAsset
public boolean hasAsset(String name)
Returns whethernameis the name of an asset in thisCategoryobject.- Parameters:
name- the name of the asset- Returns:
- whether
nameis the name of an asset in thisCategoryobject - Throws:
NullPointerException- ifnameisnull- Since:
- 1.0.0
-
getAsset
public Asset getAsset(String name)
Returns the asset with the namenamein thisCategoryobject.- Parameters:
name- the name of the asset- Returns:
- the asset with the name
namein thisCategoryobject - Throws:
NullPointerException- ifnameisnullIllegalArgumentException- ifnameis not the name of an asset in thisCategoryobject- Since:
- 1.0.0
-
-