org.cpsolver.ifs.util

## Class DataProperties

- java.lang.Object
- - java.util.Dictionary<K,V>
  - - java.util.Hashtable<Object,Object>
    - - java.util.Properties
      - - org.cpsolver.ifs.util.DataProperties

- All Implemented Interfaces:
    Serializable, Cloneable, Map<Object,Object>

      public class DataProperties
      extends Properties

  Data properties.
  Version:
    IFS 1.3 (Iterative Forward Search)
    Copyright (C) 2006 - 2014 Tomáš Müller
    muller@unitime.org
    http://muller.unitime.org
    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.
  Author:
    Tomáš Müller
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class java.util.Properties

      `defaults`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataProperties()` Constructor
    `DataProperties(Map<String,String> properties)` Constructor
    `DataProperties(Properties defaults)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsPropery(String key)` Returns true if there is such property
    `void` | `expand()`
    `String` | `getProperty(String key, String defaultValue)` Returns string property
    `boolean` | `getPropertyBoolean(String key, boolean defaultValue)` Returns boolean property
    `Boolean` | `getPropertyBoolean(String key, Boolean defaultValue)` Returns boolean property
    `double` | `getPropertyDouble(String key, double defaultValue)` Returns double property
    `Double` | `getPropertyDouble(String key, Double defaultValue)` Returns double property
    `Double[]` | `getPropertyDoubleArry(String key, Double[] defaultValue)`
    `float` | `getPropertyFloat(String key, float defaultValue)` Returns float property
    `Float` | `getPropertyFloat(String key, Float defaultValue)` Returns float property
    `int` | `getPropertyInt(String key, int defaultValue)` Returns int property
    `Integer` | `getPropertyInteger(String key, Integer defaultValue)` Returns int property
    `Integer[]` | `getPropertyIntegerArry(String key, Integer[] defaultValue)`
    `long` | `getPropertyLong(String key, long defaultValue)` Returns long property
    `Long` | `getPropertyLong(String key, Long defaultValue)` Returns long property
    `Long[]` | `getPropertyLongArry(String key, Long[] defaultValue)`
    `void` | `load(InputStream inputStream)` Loads properties from an input stream
    `void` | `setProperty(String key, Object[] value)`
    `Object` | `setProperty(String key, String value)` Sets string property
    `Map<String,String>` | `toMap()` Returns properties as a map

    - ### Methods inherited from class java.util.Properties

      `getProperty, list, list, load, loadFromXML, propertyNames, save, store, store, storeToXML, storeToXML, stringPropertyNames`

    - ### Methods inherited from class java.util.Hashtable

      `clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DataProperties

          public DataProperties()

      Constructor

    - #### DataProperties

          public DataProperties(Properties defaults)

      Constructor
      Parameters:
        `defaults` - default properties

    - #### DataProperties

          public DataProperties(Map<String,String> properties)

      Constructor
      Parameters:
        `properties` - default properties

  - ### Method Detail

    - #### getProperty

          public String getProperty(String key,
                                    String defaultValue)

      Returns string property
      Overrides:
        `getProperty` in class `Properties`
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present

    - #### setProperty

          public Object setProperty(String key,
                                    String value)

      Sets string property
      Overrides:
        `setProperty` in class `Properties`
      Parameters:
        `key` - key
        `value` - value

    - #### getPropertyInt

          public int getPropertyInt(String key,
                                    int defaultValue)

      Returns int property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### getPropertyLong

          public long getPropertyLong(String key,
                                      long defaultValue)

      Returns long property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### getPropertyInteger

          public Integer getPropertyInteger(String key,
                                            Integer defaultValue)

      Returns int property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### getPropertyLong

          public Long getPropertyLong(String key,
                                      Long defaultValue)

      Returns long property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### containsPropery

          public boolean containsPropery(String key)

      Returns true if there is such property
      Parameters:
        `key` - key
      Returns:
        true if there is such property

    - #### getPropertyBoolean

          public boolean getPropertyBoolean(String key,
                                            boolean defaultValue)

      Returns boolean property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### getPropertyDouble

          public double getPropertyDouble(String key,
                                          double defaultValue)

      Returns double property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### getPropertyFloat

          public float getPropertyFloat(String key,
                                        float defaultValue)

      Returns float property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### getPropertyBoolean

          public Boolean getPropertyBoolean(String key,
                                            Boolean defaultValue)

      Returns boolean property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### getPropertyDouble

          public Double getPropertyDouble(String key,
                                          Double defaultValue)

      Returns double property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### getPropertyFloat

          public Float getPropertyFloat(String key,
                                        Float defaultValue)

      Returns float property
      Parameters:
        `key` - key
        `defaultValue` - default value to be returned when such property is not present
      Returns:
        value of the property

    - #### setProperty

          public void setProperty(String key,
                                  Object[] value)

    - #### getPropertyLongArry

          public Long[] getPropertyLongArry(String key,
                                            Long[] defaultValue)

    - #### getPropertyIntegerArry

          public Integer[] getPropertyIntegerArry(String key,
                                                  Integer[] defaultValue)

    - #### getPropertyDoubleArry

          public Double[] getPropertyDoubleArry(String key,
                                                Double[] defaultValue)

    - #### toMap

          public Map<String,String> toMap()

      Returns properties as a map
      Returns:
        properties as a map

    - #### expand

          public void expand()

    - #### load

          public void load(InputStream inputStream)
                    throws IOException

      Loads properties from an input stream
      Overrides:
        `load` in class `Properties`
      Throws:
        `IOException`