private GLListProperty(GLStateType type, List<IGLProperty> props) { mList = props; mType = type; for (IGLProperty p : mList) { p.setParent(this); } }
/** * Construct a list of properties of given size from the provided template. * * @param template property that will be cloned and used as members of the list * @param size size of the list */ public GLListProperty(GLStateType type, IGLProperty template, int size) { mType = type; mTemplate = template; mList = new ArrayList<IGLProperty>(size); for (int i = 0; i < size; i++) { IGLProperty p = template.clone(); mList.add(p); p.setParent(this); } }
public void set(int index, IGLProperty property) { ensureCapacity(index + 1); mList.set(index, property); property.setParent(this); }
public boolean add(IGLProperty property) { property.setParent(this); return mList.add(property); }