cascading.property

## Class ConfigDef

- java.lang.Object
- - cascading.property.ConfigDef

- All Implemented Interfaces:
    java.io.Serializable

      public class ConfigDef
      extends java.lang.Object
      implements java.io.Serializable

  The ConfigDef class allows for the creation of a configuration properties template to be applied to an existing properties configuration set.

  There are three property modes, `ConfigDef.Mode.DEFAULT`, `ConfigDef.Mode.REPLACE`, and `ConfigDef.Mode.UPDATE`.

  - A DEFAULT property is only applied if there is no existing value in the property set.
  - A REPLACE property is always applied overriding any previous values.
  - An UPDATE property is always applied to an existing property. Usually when the property key represent a list of values.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `ConfigDef.Getter`
    `static class` | `ConfigDef.Mode`
    `static interface` | `ConfigDef.Setter`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Map<ConfigDef.Mode,java.util.Map<java.lang.String,java.lang.String>>` | `config`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigDef()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(ConfigDef.Mode mode, ConfigDef.Setter setter)`
    `java.lang.String` | `apply(java.lang.String key, ConfigDef.Getter getter)`
    `java.util.Collection<java.lang.String>` | `getAllKeys()`
    `protected java.util.Map<java.lang.String,java.lang.String>` | `getMode(ConfigDef.Mode mode)`
    `protected java.util.Map<java.lang.String,java.lang.String>` | `getModeSafe(ConfigDef.Mode mode)`
    `boolean` | `isEmpty()` Returns `true` if there are no properties.
    `ConfigDef` | `setProperty(ConfigDef.Mode mode, java.lang.String key, java.lang.String value)` Method setProperty sets the value to the given key using the given `ConfigDef.Mode` value.
    `ConfigDef` | `setProperty(java.lang.String key, java.lang.String value)` Method setProperty sets the value to the given key using the `ConfigDef.Mode.REPLACE` mode.

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

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

- - ### Field Detail

    - #### config

          protected java.util.Map<ConfigDef.Mode,java.util.Map<java.lang.String,java.lang.String>> config

  - ### Constructor Detail

    - #### ConfigDef

          public ConfigDef()

  - ### Method Detail

    - #### setProperty

          public ConfigDef setProperty(java.lang.String key,
                              java.lang.String value)

      Method setProperty sets the value to the given key using the `ConfigDef.Mode.REPLACE` mode.
      Parameters:
        `key` - the key
        `value` - the value
      Returns:
        the current ConfigDef instance

    - #### setProperty

          public ConfigDef setProperty(ConfigDef.Mode mode,
                              java.lang.String key,
                              java.lang.String value)

      Method setProperty sets the value to the given key using the given `ConfigDef.Mode` value.
      Parameters:
        `key` - the key
        `value` - the value
      Returns:
        the current ConfigDef instance

    - #### getMode

          protected java.util.Map<java.lang.String,java.lang.String> getMode(ConfigDef.Mode mode)

    - #### getModeSafe

          protected java.util.Map<java.lang.String,java.lang.String> getModeSafe(ConfigDef.Mode mode)

    - #### isEmpty

          public boolean isEmpty()

      Returns `true` if there are no properties.
      Returns:
        true if no properties.

    - #### apply

          public java.lang.String apply(java.lang.String key,
                               ConfigDef.Getter getter)

    - #### apply

          public void apply(ConfigDef.Mode mode,
                   ConfigDef.Setter setter)

    - #### getAllKeys

          public java.util.Collection<java.lang.String> getAllKeys()

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.