Package dev.twilite.game.stream
Class SceneObjectView
java.lang.Object
dev.twilite.game.stream.View<SceneObject>
dev.twilite.game.stream.UnitView<SceneObject,SceneObjectView>
dev.twilite.game.stream.SceneObjectView
- All Implemented Interfaces:
Iterable<SceneObject>
Lazy view over scene objects.
-
Constructor Summary
ConstructorsConstructorDescriptionSceneObjectView(Supplier<Stream<SceneObject>> source) Creates a scene-object view backed by a stream supplier. -
Method Summary
Modifier and TypeMethodDescriptionbaseId(int... ids) Filters scene objects by raw object definition id before transforms.filter(Predicate<SceneObject> filter) Returns a new scene-object view with an additional filter.id(int... ids) Filters scene objects by transformed definition id.layer(int... layers) Filters scene objects by layer bit.nameContains(String... names) Filters scene objects whose standardized name contains any provided text.Filters scene objects by exact standardized name.Filters scene objects by standardized name predicate.not()Returns a new scene-object view with the most recent filter negated.or(Predicate<SceneObject> filter) Returns a new scene-object view with the supplied filter OR'ed with the most recent filter.shape(int... shape) Filters scene objects by object shape.Methods inherited from class dev.twilite.game.stream.UnitView
nearestTo, nearestTo, on, reachable, reachableWithin, within, within, within, within, withinMethods inherited from class dev.twilite.game.stream.View
count, exists, first, iterator, map, mapToInt, stream, toListMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SceneObjectView
Creates a scene-object view backed by a stream supplier.
-
-
Method Details
-
filter
Returns a new scene-object view with an additional filter.- Overrides:
filterin classUnitView<SceneObject,SceneObjectView>
-
not
Returns a new scene-object view with the most recent filter negated.- Overrides:
notin classUnitView<SceneObject,SceneObjectView>
-
or
Returns a new scene-object view with the supplied filter OR'ed with the most recent filter.- Overrides:
orin classUnitView<SceneObject,SceneObjectView>
-
id
Filters scene objects by transformed definition id.- Parameters:
ids- object ids, usually fromObjectId
-
baseId
Filters scene objects by raw object definition id before transforms.- Parameters:
ids- object ids, usually fromObjectId
-
named
Filters scene objects by exact standardized name. Standardized names are tag-stripped, trimmed, and lowercased. -
named
Filters scene objects by standardized name predicate. The predicate receives tag-stripped, trimmed, lowercased text. -
nameContains
Filters scene objects whose standardized name contains any provided text. Standardized names are tag-stripped, trimmed, and lowercased. -
layer
Filters scene objects by layer bit. -
shape
Filters scene objects by object shape.
-