- 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 Asset
getAsset(String name)
Returns the asset with the namename
in thisCategory
object.List<Asset>
getAssets()
Returns a list of all assets in thisCategory
object.Meta
getMeta()
Returns the meta info of thisCategory
object.String
getName()
Returns the name of thisCategory
object.boolean
hasAsset(String name)
Returns whethername
is the name of an asset in thisCategory
object.
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of thisCategory
object.- Returns:
- the name of this
Category
object - Since:
- 1.0.0
-
getMeta
public Meta getMeta()
Returns the meta info of thisCategory
object.- Returns:
- the meta info of this
Category
object - Since:
- 1.0.0
-
hasAsset
public boolean hasAsset(String name)
Returns whethername
is the name of an asset in thisCategory
object.- Parameters:
name
- the name of the asset- Returns:
- whether
name
is the name of an asset in thisCategory
object - Throws:
NullPointerException
- ifname
isnull
- Since:
- 1.0.0
-
getAsset
public Asset getAsset(String name)
Returns the asset with the namename
in thisCategory
object.- Parameters:
name
- the name of the asset- Returns:
- the asset with the name
name
in thisCategory
object - Throws:
NullPointerException
- ifname
isnull
IllegalArgumentException
- ifname
is not the name of an asset in thisCategory
object- Since:
- 1.0.0
-
-