Package com.exasol.adapter
Class AbstractAdapterProperties
- java.lang.Object
-
- com.exasol.adapter.AbstractAdapterProperties
-
- Direct Known Subclasses:
AdapterProperties
public abstract class AbstractAdapterProperties extends 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(Map<String,String> properties)
Create a new instance ofAdapterProperties
from a key-value map
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(String key)
Check if a property with the given key existsSet<Map.Entry<String,String>>
entrySet()
Get set of contained entriesboolean
equals(Object o)
String
get(String key)
Get value for keyint
hashCode()
boolean
isEmpty()
Check if the properties are emptyboolean
isEnabled(String key)
Check if the switch with the given key is enabledSet<String>
keySet()
Get set of contained keysCollection<String>
values()
Get collection of contained values
-
-
-
Constructor Detail
-
AbstractAdapterProperties
public AbstractAdapterProperties(Map<String,String> properties)
Create a new instance ofAdapterProperties
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(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(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 String get(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 Set<String> keySet()
Get set of contained keys- Returns:
- a set view of the keys contained in properties
-
values
public Collection<String> values()
Get collection of contained values- Returns:
- a collection view of the values contained in properties
-
entrySet
public Set<Map.Entry<String,String>> entrySet()
Get set of contained entries- Returns:
- a Set view of the mappings contained in properties
-
-