Class AbstractAdapterProperties

  • Direct Known Subclasses:
    AdapterProperties

    public abstract class AbstractAdapterProperties
    extends java.lang.Object
    This is the abstract base class that provides access to the user defined adapter properties.

    On this level the basic access to properties as key-value pairs is handled. If you are looking for interpreted properties, check the concrete implementations of this abstract class.

    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractAdapterProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
      Create a new instance of AdapterProperties from a key-value map
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(java.lang.String key)
      Check if a property with the given key exists
      java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.String>> entrySet()
      Get set of contained entries
      boolean equals​(java.lang.Object o)  
      java.lang.String get​(java.lang.String key)
      Get value for key
      int hashCode()  
      boolean isEmpty()
      Check if the properties are empty
      boolean isEnabled​(java.lang.String key)
      Check if the switch with the given key is enabled
      java.util.Set<java.lang.String> keySet()
      Get set of contained keys
      java.util.Collection<java.lang.String> values()
      Get collection of contained values
      • Methods inherited from class java.lang.Object

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

      • AbstractAdapterProperties

        public AbstractAdapterProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
        Create a new instance of AdapterProperties from a key-value map
        Parameters:
        properties - map of property keys and values
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Check if the properties are empty
        Returns:
        true if there are no properties
      • containsKey

        public boolean containsKey​(java.lang.String key)
        Check if a property with the given key exists
        Parameters:
        key - property to search for
        Returns:
        true if the property list contains the property with the given key
      • isEnabled

        public boolean isEnabled​(java.lang.String key)
        Check if the switch with the given key is enabled
        Parameters:
        key - switch name
        Returns:
        true if the switch property exists and is enabled
      • get

        public java.lang.String get​(java.lang.String key)
        Get value for key
        Parameters:
        key - property to search for
        Returns:
        corresponding value or null if the key-value pair does not exist
      • keySet

        public java.util.Set<java.lang.String> keySet()
        Get set of contained keys
        Returns:
        a set view of the keys contained in properties
      • values

        public java.util.Collection<java.lang.String> values()
        Get collection of contained values
        Returns:
        a collection view of the values contained in properties
      • entrySet

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.String>> entrySet()
        Get set of contained entries
        Returns:
        a Set view of the mappings contained in properties
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object