Class HookCondition.HookConditionBuilder<K,V>

java.lang.Object
net.paulem.arcana.hook.HookCondition.HookConditionBuilder<K,V>
Type Parameters:
K - the type of the keys
V - the type of the values associated with each key
Enclosing class:
HookCondition<K,V>

public static class HookCondition.HookConditionBuilder<K,V> extends Object
A builder for HookCondition instances.
  • Constructor Details

    • HookConditionBuilder

      public HookConditionBuilder()
  • Method Details

    • when

      public HookCondition.HookConditionBuilder<K,V> when(K key, V value)
      Registers the value to use for the given key.
      Parameters:
      key - the key to register
      value - the value to associate with the key
      Returns:
      this builder, for chaining
    • build

      public HookCondition<K,V> build()
      Builds a new HookCondition containing all the keys and values registered so far.
      Returns:
      a new HookCondition instance