EntityView class

Implemented types

Constructors

EntityView(EntityManager _entityManager, Archetype archetype)
EntityView.fromTypes(EntityManager entityManager, Set<Type> componentTypes)
factory

Properties

archetype Archetype
final
first Entity
The first element.
no setteroverride
hashCode Entity
The hash code for this object.
no setterinherited
isEmpty bool
Whether this collection has no elements.
no setteroverride
isNotEmpty bool
Whether this collection has at least one element.
no setteroverride
iterator Iterator<Entity>
A new Iterator that allows iterating the elements of this Iterable.
no setteroverride
last Entity
The last element.
no setteroverride
length Entity
The number of elements in this Iterable.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single Entity
Checks that this iterable has only one element, and returns that element.
no setteroverride

Methods

any(bool test(Entity entity)) bool
Checks whether any element of this iterable satisfies test.
override
cast<E>() Iterable<E>
A view of this iterable as an iterable of R instances.
override
contains(Object? element) bool
Whether the collection contains an element equal to element.
override
elementAt(int index) Entity
Returns the indexth element.
override
every(bool test(Entity entity)) bool
Checks whether every element of this iterable satisfies test.
override
expand<R>(Iterable<R> toElements(Entity entity)) Iterable<R>
Expands each element of this Iterable into zero or more elements.
override
firstWhere(bool test(Entity entity), {Entity orElse()?}) Entity
The first element that satisfies the given predicate test.
override
fold<T>(T initialValue, T combine(T previousValue, Entity entity)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
override
followedBy(Iterable<Entity> other) Iterable<Entity>
Creates the lazy concatenation of this iterable and other.
override
forEach(void f(Entity entity)) → void
Invokes action on each element of this iterable in iteration order.
override
getComponent<T extends Component>(Entity entity) → T?
getComponentArray(Type type) SparseList<Component>?
getComponentForType(Type type, Entity entity) Component?
join([String separator = '']) String
Converts each element to a String and concatenates the strings.
override
lastWhere(bool test(Entity entity), {Entity orElse()?}) Entity
The last element that satisfies the given predicate test.
override
map<R>(R f(Entity entity)) Iterable<R>
The current elements of this iterable modified by toElement.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reduce(Entity combine(Entity value, Entity element)) Entity
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
override
singleWhere(bool test(Entity entity), {Entity orElse()?}) Entity
The single element that satisfies test.
override
skip(int count) Iterable<Entity>
Creates an Iterable that provides all but the first count elements.
override
skipWhile(bool test(Entity entity)) Iterable<Entity>
Creates an Iterable that skips leading elements while test is satisfied.
override
take(int count) Iterable<Entity>
Creates a lazy iterable of the count first elements of this iterable.
override
takeWhile(bool test(Entity entity)) Iterable<Entity>
Creates a lazy iterable of the leading elements satisfying test.
override
toList({bool growable = true}) List<Entity>
Creates a List containing the elements of this Iterable.
override
toSet() Set<Entity>
Creates a Set containing the same elements as this iterable.
override
toString() String
A string representation of this object.
inherited
where(bool test(Entity entity)) Iterable<Entity>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
override
whereType<T>() Iterable<E>
Creates a new lazy Iterable with all elements that have type T.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited