Class StandardBlackboard

    • Constructor Detail

      • StandardBlackboard

        public StandardBlackboard()
    • Method Detail

      • getOrCreate

        public <V> V getOrCreate​(Key<V> key,
                                 Supplier<? super V> defaultValue)
        Description copied from interface: Blackboard
        Retrieves a value by key or from the default value.
        Specified by:
        getOrCreate in interface Blackboard
        Type Parameters:
        V - The value type
        Parameters:
        key - The key
        defaultValue - The default value
        Returns:
        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