@Override public Iterator<T> iterator () { if (iterable == null) { iterable = new ArrayIterable<T>(array, false); } return iterable.iterator(); }
public UIObject(boolean active) { this.id = objId++; this.lifetime = -1; this.lifestart = -1; this.active = active; this.parent = null; this.destroyed = false; this.events = new EventHelper(this); this.position = new Vector2(0, 0); this.components = new Array<>(true, 8); this.compIterator = new ArrayIterable<>(this.components, true); }
private void setValuesToEntities () { basicProperties.setValuesToEntity(); if (groupSelected) groupProperties.setValuesToSceneGroupData(); for (ComponentTable<?> table : new ArrayIterable<>(activeComponentTables)) table.setValuesToEntities(); }
public static <BaseType, RequiredType> void stream (Array<BaseType> array, Class<RequiredType> classFilter, Consumer<RequiredType> consumer) { for (BaseType obj : new ArrayIterable<>(array)) { if (classFilter.isInstance(obj)) { consumer.accept((RequiredType) obj); } } }
public static <BaseType, RequiredType> void cancelableStream (Array<BaseType> array, Class<RequiredType> classFilter, CancelableConsumer<RequiredType> consumer) { for (BaseType obj : new ArrayIterable<>(array)) { if (classFilter.isInstance(obj)) { if (consumer.accept((RequiredType) obj)) break; } } }
public ArrayIterable<T> newIterator () { return new ArrayIterable<T>(array, false); }
public static <BaseType> void stream (Array<BaseType> array, Consumer<BaseType> consumer) { for (BaseType obj : new ArrayIterable<>(array)) { consumer.accept(obj); } }
public static <BaseType> void cancelableStream (Array<BaseType> array, CancelableConsumer<BaseType> consumer) { for (BaseType obj : new ArrayIterable<>(array)) { if (consumer.accept(obj)) break; } }