public interface Property
void set(int, T)to get and set values at a particular index. To support primitives without boxing, they are not part of the interface definition but are required. The exposed get() and set() methods, and potentially a bulk accessor (such as returning the underlying array) are the supported methods for manipulating decorated property values. Property instances are carefully managed by an EntitySystem. There is ever only one property instance per defined property in a component type for a system. Property instances are created by
PropertyFactories. Every concrete Property class must be annotated with
Factoryto specify the PropertyFactory class that constructs it. That PropertyFactory must expose a no-argument constructor, or a constructor that takes an
Attributesinstance as its only argument.
void setCapacity(int size)
size - 1. If >size is less than the current capacity, all previous values with an index less than size must be preserved, and the remainder are discarded. If size is greater than the current capacity, all previous indexed values must be preserved and the new values can be undefined. This is for internal use only to manage, and should not be called on decorated properties returned by
size- The new capacity, will be at least 1
void swap(int indexA, int indexB)
indexA- The index of the first value
indexB- The index of the second value
Copyright © 2013. All Rights Reserved.