Package dev.twilite.game.stream
Class ComponentView
- All Implemented Interfaces:
Iterable<IfComponent>
Lazy view over interface components.
-
Constructor Summary
ConstructorsConstructorDescriptionComponentView(Supplier<Stream<IfComponent>> source) Creates a component view backed by a stream supplier. -
Method Summary
Modifier and TypeMethodDescriptionfilter(Predicate<IfComponent> filter) Returns a new component view with an additional filter.Filters components by name, ignoring case.Filters components by name.not()Returns a new component view with the most recent filter negated.Filters components that expose any supplied interaction option.or(Predicate<IfComponent> filter) Returns a new component view with the supplied filter OR'ed with the most recent filter.Filters components whose text contains any supplied text, ignoring case.Filters components by standardized text.Methods 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
-
ComponentView
Creates a component view backed by a stream supplier.
-
-
Method Details
-
filter
Returns a new component view with an additional filter.- Overrides:
filterin classView<IfComponent>
-
not
Returns a new component view with the most recent filter negated.- Overrides:
notin classView<IfComponent>
-
or
Returns a new component view with the supplied filter OR'ed with the most recent filter.- Overrides:
orin classView<IfComponent>
-
text
Filters components by standardized text. The predicate receives tag-stripped, trimmed, lowercased text. -
text
Filters components whose text contains any supplied text, ignoring case. -
named
Filters components by name, ignoring case. -
named
Filters components by name. -
option
Filters components that expose any supplied interaction option.
-