Class StandardBlackboard

java.lang.Object
org.spongepowered.plugin.builtin.StandardBlackboard
All Implemented Interfaces:
Blackboard

public final class StandardBlackboard extends Object implements Blackboard
  • Constructor Details

    • StandardBlackboard

      public StandardBlackboard()
  • Method Details

    • set

      public <V> void set(Key<V> key, V value)
      Description copied from interface: Blackboard
      Sets a value by key.
      Specified by:
      set in interface Blackboard
      Type Parameters:
      V - The value type
      Parameters:
      key - The key
      value - The value
    • get

      public <V> V get(Key<V> key)
      Specified by:
      get in interface Blackboard
      Type Parameters:
      V - The value type
      Parameters:
      key - The key
      Returns:
      The value
    • find

      public <V> Optional<V> find(Key<V> key)
      Specified by:
      find in interface Blackboard
      Type Parameters:
      V - The value type
      Parameters:
      key - The key
      Returns:
      The value or Optional.empty() otherwise