Package 

Interface TypedKeyManager

  • All Implemented Interfaces:

    
    public interface TypedKeyManager<KEY extends Object>
    
                        

    We have a common use-case when there are a number of key-value pairs where value type is implied by the key, i.e. all possible values of particular key have the same type.

    This interface defines common strategy for representing such key's management.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract KClass<?> getValueType(KEY key)
      abstract KEY parseKey(String raw) Quite often we want keys to be defined in configs, and it's also not rare for configs to be text files (e.g.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • parseKey

         abstract KEY parseKey(String raw)

        Quite often we want keys to be defined in configs, and it's also not rare for configs to be text files (e.g. YAML files). So, we might need to map particular key's string representation to the key object.

        This method allows to do such key parsing.