Package: org.codehaus.groovy.ant

## [Java] Class AntProjectPropertiesDelegate

- org.codehaus.groovy.ant.AntProjectPropertiesDelegate

-     public class AntProjectPropertiesDelegate
      extends Hashtable

  Live Hashtable-style view over an Ant project's immutable properties. Mutation requests are redirected to Ant where possible and otherwise rejected.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `AntProjectPropertiesDelegate(Project project)` Creates a delegate backed by the supplied Ant project.
    `AntProjectPropertiesDelegate(Map<? extends String, ?> t)` Creates a detached delegate initialized from the supplied map.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `clear()` throws: UnsupportedOperationException is always thrown when this method is invoked.
    `` | `public Object` | `clone()` Returns a shallow copy of the current project properties.
    `` | `public boolean` | `contains(Object value)` Indicates whether the delegated property set contains the supplied value.
    `` | `public boolean` | `containsKey(Object key)` Indicates whether the delegated property set contains the supplied key.
    `` | `public boolean` | `containsValue(Object value)` Indicates whether the delegated property set contains the supplied value.
    `` | `public Enumeration<Object>` | `elements()` Returns an enumeration over the current property values.
    `` | `public Set<Map.Entry<String, Object>>` | `entrySet()` Returns the delegated entry-set view.
    `` | `public boolean` | `equals(Object o)` Compares this delegate with another object using the delegated property map.
    `` | `public Object` | `get(Object key)` Returns the current value of the supplied property.
    `` | `public int` | `hashCode()` Returns the hash code of the current project properties.
    `` | `public boolean` | `isEmpty()` Indicates whether the delegated property set is empty.
    `` | `public Set<String>` | `keySet()` Returns the delegated key-set view.
    `` | `public Enumeration<String>` | `keys()` Returns an enumeration over the current property names.
    `` | `public Object` | `put(String key, Object value)` Stores the supplied property value through the owning Ant project.
    `` | `public void` | `putAll(Map<? extends String, ?> t)` Copies every supplied property into the owning Ant project.
    `` | `public Object` | `remove(Object key)` throws: UnsupportedOperationException is always thrown when this method is invoked.
    `` | `public int` | `size()` Returns the number of properties currently exposed by the project.
    `` | `public String` | `toString()` Returns the string form of the delegated property map.
    `` | `public Collection<Object>` | `values()` Returns the current property values.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Hashtable` | `clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getClass, getOrDefault, hashCode, isEmpty, keySet, keys, merge, notify, notifyAll, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, toString, values, wait, wait, wait`

- - ### Constructor Detail

    - #### public AntProjectPropertiesDelegate(Project project)

      Creates a delegate backed by the supplied Ant project.

      Parameters:
        `project` - the project whose properties should be exposed

    - #### public AntProjectPropertiesDelegate(Map<? extends String, ?> t)

      Creates a detached delegate initialized from the supplied map.

      Parameters:
        `t` - the initial property values

  - ### Method Detail

    - #### public void clear()

      throws:
        UnsupportedOperationException is always thrown when this method is invoked. The Project properties are immutable.

    - #### @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "CN_IDIOM_NO_SUPER_CALL", justification = "Okay for our use case. The cloned delegate should have the correct type.")
      public Object clone()

      Returns a shallow copy of the current project properties.

      Returns:
        a cloned property map

    - #### public boolean contains(Object value)

      Indicates whether the delegated property set contains the supplied value.

      Parameters:
        `value` - the value to look up
      Returns:
        `true` if the value is present

    - #### public boolean containsKey(Object key)

      Indicates whether the delegated property set contains the supplied key.

      Parameters:
        `key` - the property name to look up
      Returns:
        `true` if the key is present

    - #### public boolean containsValue(Object value)

      Indicates whether the delegated property set contains the supplied value.

      Parameters:
        `value` - the value to look up
      Returns:
        `true` if the value is present

    - #### public Enumeration<Object> elements()

      Returns an enumeration over the current property values.

      Returns:
        an enumeration across the delegated values

    - #### public Set<Map.Entry<String, Object>> entrySet()

      Returns the delegated entry-set view.

      Returns:
        a set view over the properties

    - #### public boolean equals(Object o)

      Compares this delegate with another object using the delegated property map.

      Parameters:
        `o` - the object to compare against
      Returns:
        `true` if both views are equal

    - #### public Object get(Object key)

      Returns the current value of the supplied property.

      Parameters:
        `key` - the property name to resolve
      Returns:
        the current value, or `null` if absent

    - #### public int hashCode()

      Returns the hash code of the current project properties.

      Returns:
        the delegated hash code

    - #### public boolean isEmpty()

      Indicates whether the delegated property set is empty.

      Returns:
        `true` if the project currently has no properties

    - #### public Set<String> keySet()

      Returns the delegated key-set view.

      Returns:
        a set view over the property names

    - #### public Enumeration<String> keys()

      Returns an enumeration over the current property names.

      Returns:
        an enumeration across the delegated keys

    - #### public Object put(String key, Object value)

      Stores the supplied property value through the owning Ant project.

      Parameters:
        `key` - the property name
        `value` - the property value
      Returns:
        the previous value, or `null` if the property was not already present

    - #### public void putAll(Map<? extends String, ?> t)

      Copies every supplied property into the owning Ant project.

      Parameters:
        `t` - the properties to add

    - #### public Object remove(Object key)

      throws:
        UnsupportedOperationException is always thrown when this method is invoked. The Project properties are immutable.

    - #### public int size()

      Returns the number of properties currently exposed by the project.

      Returns:
        the property count

    - #### public String toString()

      Returns the string form of the delegated property map.

      Returns:
        the property map as text

    - #### public Collection<Object> values()

      Returns the current property values.

      Returns:
        a collection view over the values