Beispiel #1
0
 /**
  * Retrieve the attribute at a given index.
  *
  * @param index - the index to look up.
  * @return The attribute at that index.
  */
 public Attribute get(int index) {
   return new Attribute((NbtCompound) attributes.get(index));
 }
Beispiel #2
0
 /**
  * Add a new attribute to the list.
  *
  * @param attribute - the new attribute.
  */
 public void add(Attribute attribute) {
   Preconditions.checkNotNull(attribute.getName(), "must specify an attribute name.");
   attributes.add(attribute.data);
 }
Beispiel #3
0
 public void clear() {
   attributes.clear();
 }
Beispiel #4
0
 /**
  * Retrieve the number of attributes.
  *
  * @return Number of attributes.
  */
 public int size() {
   return attributes.size();
 }