# Class AssetPack

java.lang.Object
com.codename1.gaming.level.AssetPack

public class AssetPack extends Object
A themed collection of `AssetDef`s -- the editor's "Platformer", "Top-Down RPG" or "Board & Card" pack. A `GameLevel` names the pack it draws from (`GameLevel#getAssetPack()`), and an `AssetCatalog` indexes every pack so a placed element's `GameElement#getAssetId()` resolves to its `AssetDef`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AssetPack()`
  `AssetPack(String id, String name)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AssetPack`
  `add(AssetDef def)`
  Adds an asset definition to the pack (replacing any with the same id).
  `List<AssetDef>`
  `assets()`
  The asset definitions in insertion order (the order they appear in a palette).
  `boolean`
  `contains(String assetId)`
  `AssetDef`
  `get(String assetId)`
  `String`
  `getId()`
  `String`
  `getName()`
  `AssetPack`
  `setId(String id)`
  `AssetPack`
  `setName(String name)`
  `int`
  `size()`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AssetPack

    public AssetPack()

  - ### AssetPack

    public AssetPack(String id, String name)

- ## Method Details

  - ### getId

    public String getId()

  - ### setId

    public AssetPack setId(String id)

  - ### getName

    public String getName()

  - ### setName

    public AssetPack setName(String name)

  - ### add

    public AssetPack add(AssetDef def)
    Adds an asset definition to the pack (replacing any with the same id).

  - ### get

    public AssetDef get(String assetId)

  - ### contains

    public boolean contains(String assetId)

  - ### assets

    public List<AssetDef> assets()
    The asset definitions in insertion order (the order they appear in a palette).

  - ### size

    public int size()