Package dev.twilite.game.stream
Class ProjectileView
- All Implemented Interfaces:
Iterable<Projectile>
Lazy view over projectiles.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectileView(Supplier<Stream<Projectile>> source) Creates a projectile view backed by a stream supplier. -
Method Summary
Modifier and TypeMethodDescriptionfilter(Predicate<Projectile> filter) Returns a new projectile view with an additional filter.id(int... ids) Filters projectiles by id.not()Returns a new projectile view with the most recent filter negated.or(Predicate<Projectile> filter) Returns a new projectile view with the supplied filter OR'ed with the most recent filter.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
-
ProjectileView
Creates a projectile view backed by a stream supplier.
-
-
Method Details
-
filter
Returns a new projectile view with an additional filter.- Overrides:
filterin classUnitView<Projectile,ProjectileView>
-
not
Returns a new projectile view with the most recent filter negated.- Overrides:
notin classUnitView<Projectile,ProjectileView>
-
or
Returns a new projectile view with the supplied filter OR'ed with the most recent filter.- Overrides:
orin classUnitView<Projectile,ProjectileView>
-
id
Filters projectiles by id.- Parameters:
ids- effect ids, usually fromEffectId
-