org.apache.calcite.avatica

## Class ConnectionConfigImpl.PropEnv

- java.lang.Object
- - org.apache.calcite.avatica.ConnectionConfigImpl.PropEnv

Enclosing class:
  ConnectionConfigImpl

    public static class ConnectionConfigImpl.PropEnv
    extends Object

The combination of a property definition and a map of property values.

### Field Summary

Fields
`(package private) Map<? extends ConnectionProperty,String>` `map`
`private ConnectionProperty` `property`

### Constructor Summary

Constructors
Constructor and Description
`PropEnv(Map<? extends ConnectionProperty,String> map, ConnectionProperty property)`

### Method Summary

All Methods Instance Methods Concrete Methods
`private <T> T` `get_(ConnectionConfigImpl.Converter<T> converter, String defaultValue)`
`boolean` `getBoolean()` Returns the boolean value of this property.
`boolean` `getBoolean(boolean defaultValue)` Returns the boolean value of this property.
`private <T> T` `getDefaultNull(ConnectionConfigImpl.Converter<T> converter)`
`double` `getDouble()` Returns the double value of this property.
`double` `getDouble(Number defaultValue)` Returns the double value of this property.
`<E extends Enum<E>> E` `getEnum(Class<E> enumClass)` Returns the enum value of this property.
`<E extends Enum<E>> E` `getEnum(Class<E> enumClass, E defaultValue)` Returns the enum value of this property.
`int` `getInt()` Returns the int value of this property.
`int` `getInt(Number defaultValue)` Returns the int value of this property.
`long` `getLong()` Returns the long value of this property.
`long` `getLong(Number defaultValue)` Returns the long value of this property.
`<T> T` `getPlugin(Class<T> pluginClass, String defaultClassName, T defaultInstance)` Returns an instance of a plugin, using a given class name if none is set.
`<T> T` `getPlugin(Class<T> pluginClass, T defaultInstance)` Returns an instance of a plugin.
`String` `getString()` Returns the string value of this property, or null if not specified and no default.
`String` `getString(String defaultValue)` Returns the string value of this property, or null if not specified and no default.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### map

    final Map<? extends ConnectionProperty,String> map

#### property

    private final ConnectionProperty property

### Constructor Detail

#### PropEnv

    public PropEnv(Map<? extends ConnectionProperty,String> map,
                   ConnectionProperty property)

### Method Detail

#### get_

    private <T> T get_(ConnectionConfigImpl.Converter<T> converter,
                       String defaultValue)

#### getDefaultNull

    private <T> T getDefaultNull(ConnectionConfigImpl.Converter<T> converter)

#### getString

    public String getString()

Returns the string value of this property, or null if not specified and no default.

#### getString

    public String getString(String defaultValue)

Returns the string value of this property, or null if not specified and no default.

#### getInt

    public int getInt()

Returns the int value of this property. Throws if not set and no default.

#### getInt

    public int getInt(Number defaultValue)

Returns the int value of this property. Throws if not set and no default.

#### getLong

    public long getLong()

Returns the long value of this property. Throws if not set and no default.

#### getLong

    public long getLong(Number defaultValue)

Returns the long value of this property. Throws if not set and no default.

#### getDouble

    public double getDouble()

Returns the double value of this property. Throws if not set and no default.

#### getDouble

    public double getDouble(Number defaultValue)

Returns the double value of this property. Throws if not set and no default.

#### getBoolean

    public boolean getBoolean()

Returns the boolean value of this property. Throws if not set and no default.

#### getBoolean

    public boolean getBoolean(boolean defaultValue)

Returns the boolean value of this property. Throws if not set and no default.

#### getEnum

    public <E extends Enum<E>> E getEnum(Class<E> enumClass)

Returns the enum value of this property. Throws if not set and no default.

#### getEnum

    public <E extends Enum<E>> E getEnum(Class<E> enumClass,
                                         E defaultValue)

Returns the enum value of this property. Throws if not set and no default.

#### getPlugin

    public <T> T getPlugin(Class<T> pluginClass,
                           T defaultInstance)

Returns an instance of a plugin.

Throws if not set and no default. Also throws if the class does not implement the required interface, or if it does not have a public default constructor or an public static field called `#INSTANCE`.

#### getPlugin

    public <T> T getPlugin(Class<T> pluginClass,
                           String defaultClassName,
                           T defaultInstance)

Returns an instance of a plugin, using a given class name if none is set.

Throws if not set and no default. Also throws if the class does not implement the required interface, or if it does not have a public default constructor or an public static field called `#INSTANCE`.