Package dev.twilite.game.stream
Class EffectView
Lazy view over spot effects.
-
Constructor Summary
ConstructorsConstructorDescriptionEffectView(Supplier<Stream<Effect>> source) Creates an effect view backed by a stream supplier. -
Method Summary
Modifier and TypeMethodDescriptionactive()Filters to effects with an active animation.animation(int... animations) Filters effects by animation id.Returns a new effect view with an additional filter.id(int... ids) Filters effects by id.not()Returns a new effect view with the most recent filter negated.Returns a new effect 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
-
EffectView
Creates an effect view backed by a stream supplier.
-
-
Method Details
-
filter
Returns a new effect view with an additional filter.- Overrides:
filterin classUnitView<Effect,EffectView>
-
not
Returns a new effect view with the most recent filter negated.- Overrides:
notin classUnitView<Effect,EffectView>
-
or
Returns a new effect view with the supplied filter OR'ed with the most recent filter.- Overrides:
orin classUnitView<Effect,EffectView>
-
id
Filters effects by id.- Parameters:
ids- effect ids, usually fromEffectId
-
animation
Filters effects by animation id.- Parameters:
animations- animation ids, usually fromAnimationId
-
active
Filters to effects with an active animation.
-