Class AbstractStringKeyedMapLogic<TYPE_LOGIC,TYPE_OUTPUT>

java.lang.Object
xyz.ronella.trivial.handy.AbstractKeyedMapLogic<String,TYPE_LOGIC,TYPE_OUTPUT>
xyz.ronella.trivial.handy.AbstractStringKeyedMapLogic<TYPE_LOGIC,TYPE_OUTPUT>
Type Parameters:
TYPE_LOGIC - The type of logic that the map will hold.
TYPE_OUTPUT - The type of output that the logic will create.
Direct Known Subclasses:
StringKeyedMapExecutor, StringKeyedMapFactory, StringKeyedMapGenerator

public abstract class AbstractStringKeyedMapLogic<TYPE_LOGIC,TYPE_OUTPUT> extends AbstractKeyedMapLogic<String,TYPE_LOGIC,TYPE_OUTPUT>
The base class of the StringKeyedMapLogic implementations.
Since:
2.2.0
  • Field Details

  • Constructor Details

    • AbstractStringKeyedMapLogic

      @SafeVarargs public AbstractStringKeyedMapLogic(Map<String,TYPE_LOGIC> map, TYPE_LOGIC defaultLogic, Map.Entry<String,TYPE_LOGIC>... logics)
      Creates an instance of AbstractStringKeyedMapLogic
      Parameters:
      map - An external map that will be used as storage of logic.
      defaultLogic - The default create logic if the key used was not in the map.
      logics - An arrays of create logic mapped to key.
  • Method Details

    • get

      public abstract Optional<TYPE_OUTPUT> get(String key)
      Must have the implementation on how to get the logic based on a key and must be able to handle if that key doesn't exists.
      Parameters:
      key - The target key of the corresponding logic.
      Returns:
      An optional logic implementation.