Package org.spongepowered.api.state
Interface StateMatcher.Builder<S extends State<S>,T extends StateContainer<S>>
- 
- All Superinterfaces:
- AbstractBuilder<StateMatcher<S>>,- Buildable.Builder<StateMatcher<S>>,- Builder<StateMatcher<S>,StateMatcher.Builder<S,T>>,- CopyableBuilder<StateMatcher<S>,StateMatcher.Builder<S,T>>,- ResettableBuilder<StateMatcher<S>,StateMatcher.Builder<S,T>>
 - Enclosing interface:
- StateMatcher<S extends State<S>>
 
 public static interface StateMatcher.Builder<S extends State<S>,T extends StateContainer<S>> extends Builder<StateMatcher<S>,StateMatcher.Builder<S,T>>, CopyableBuilder<StateMatcher<S>,StateMatcher.Builder<S,T>> A builder forStateMatchers.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StateMatcher<S>build()Builds aStateMatcher.StateMatcher.Builder<S,T>matcher(KeyValueMatcher<?> matcher)Adds aKeyValueMatcherthat theStateneeds to match with.default <V extends java.lang.Comparable<V>>
 StateMatcher.Builder<S,T>stateProperty(java.util.function.Supplier<? extends StateProperty<V>> stateProperty, V value)Adds aStatePropertyand value that needs to match on aStateto match.<V extends java.lang.Comparable<V>>
 StateMatcher.Builder<S,T>stateProperty(StateProperty<V> stateProperty, V value)Adds aStatePropertyand value that needs to match on aStateto match.default StateMatcher.Builder<S,T>supportsStateProperty(java.util.function.Supplier<? extends StateProperty<?>> stateProperty)Adds aStatePropertythat needs to be present on aStateto match.StateMatcher.Builder<S,T>supportsStateProperty(StateProperty<?> stateProperty)Adds aStatePropertythat needs to be present on aStateto match.default StateMatcher.Builder<S,T>type(java.util.function.Supplier<? extends T> type)Sets the rootStateContainerfor theStateMatcher.StateMatcher.Builder<S,T>type(T type)Sets the rootStateContainerfor theStateMatcher.- 
Methods inherited from interface org.spongepowered.api.util.CopyableBuilderfrom
 
- 
 
- 
- 
- 
Method Detail- 
typedefault StateMatcher.Builder<S,T> type(java.util.function.Supplier<? extends T> type) Sets the rootStateContainerfor theStateMatcher.- Parameters:
- type- The- StateContainerto use
- Returns:
- This builder, for chaining
 
 - 
typeStateMatcher.Builder<S,T> type(T type) Sets the rootStateContainerfor theStateMatcher.- Parameters:
- type- The- StateContainerto use
- Returns:
- This builder, for chaining
 
 - 
supportsStatePropertyStateMatcher.Builder<S,T> supportsStateProperty(StateProperty<?> stateProperty) Adds aStatePropertythat needs to be present on aStateto match.type(StateContainer)ortype(Supplier)must be called before this is called as supportedstate propertiesare specific to the type- Parameters:
- stateProperty- The state property
- Returns:
- This builder, for chaining
 
 - 
supportsStatePropertydefault StateMatcher.Builder<S,T> supportsStateProperty(java.util.function.Supplier<? extends StateProperty<?>> stateProperty) Adds aStatePropertythat needs to be present on aStateto match.type(StateContainer)ortype(Supplier)must be called before this is called as supportedstate propertiesare specific to the type- Parameters:
- stateProperty- The state property
- Returns:
- This builder, for chaining
 
 - 
stateProperty<V extends java.lang.Comparable<V>> StateMatcher.Builder<S,T> stateProperty(StateProperty<V> stateProperty, V value) Adds aStatePropertyand value that needs to match on aStateto match.type(StateContainer)ortype(Supplier)must be called before this is called as supportedstate propertiesare specific to the type- Type Parameters:
- V- The value type
- Parameters:
- stateProperty- The state property
- value- The value to match
- Returns:
- This builder, for chaining
 
 - 
statePropertydefault <V extends java.lang.Comparable<V>> StateMatcher.Builder<S,T> stateProperty(java.util.function.Supplier<? extends StateProperty<V>> stateProperty, V value) Adds aStatePropertyand value that needs to match on aStateto match.- Type Parameters:
- V- The value type
- Parameters:
- stateProperty- The state property
- value- The value to match
- Returns:
- This builder, for chaining
 
 - 
matcherStateMatcher.Builder<S,T> matcher(KeyValueMatcher<?> matcher) Adds aKeyValueMatcherthat theStateneeds to match with.- Parameters:
- matcher- The matcher
- Returns:
- This builder, for chaining
 
 - 
buildStateMatcher<S> build() Builds aStateMatcher.- Specified by:
- buildin interface- AbstractBuilder<S extends State<S>>
- Specified by:
- buildin interface- Buildable.Builder<S extends State<S>>
- Returns:
- The built state matcher
 
 
- 
 
-