Package org.codehaus.groovy.ant
Class AntProjectPropertiesDelegate
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
Live
Hashtable-style view over an Ant project's immutable properties.
Mutation requests are redirected to Ant where possible and otherwise rejected.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAntProjectPropertiesDelegate(Map<? extends String, ?> t) Creates a detached delegate initialized from the supplied map.AntProjectPropertiesDelegate(org.apache.tools.ant.Project project) Creates a delegate backed by the supplied Ant project. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clone()Returns a shallow copy of the current project properties.booleanIndicates whether the delegated property set contains the supplied value.booleancontainsKey(Object key) Indicates whether the delegated property set contains the supplied key.booleancontainsValue(Object value) Indicates whether the delegated property set contains the supplied value.elements()Returns an enumeration over the current property values.entrySet()Returns the delegated entry-set view.booleanCompares this delegate with another object using the delegated property map.Returns the current value of the supplied property.inthashCode()Returns the hash code of the current project properties.booleanisEmpty()Indicates whether the delegated property set is empty.keys()Returns an enumeration over the current property names.keySet()Returns the delegated key-set view.Stores the supplied property value through the owning Ant project.voidCopies every supplied property into the owning Ant project.intsize()Returns the number of properties currently exposed by the project.toString()Returns the string form of the delegated property map.values()Returns the current property values.Methods inherited from class java.util.Hashtable
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, rehash, remove, replace, replace, replaceAll
-
Constructor Details
-
AntProjectPropertiesDelegate
public AntProjectPropertiesDelegate(org.apache.tools.ant.Project project) Creates a delegate backed by the supplied Ant project.- Parameters:
project- the project whose properties should be exposed
-
AntProjectPropertiesDelegate
Creates a detached delegate initialized from the supplied map.- Parameters:
t- the initial property values
-
-
Method Details
-
hashCode
public int hashCode()Returns the hash code of the current project properties. -
size
public int size()Returns the number of properties currently exposed by the project. -
clear
public void clear() -
isEmpty
public boolean isEmpty()Indicates whether the delegated property set is empty. -
clone
Returns a shallow copy of the current project properties. -
contains
Indicates whether the delegated property set contains the supplied value. -
containsKey
Indicates whether the delegated property set contains the supplied key.- Specified by:
containsKeyin interfaceMap<String,Object> - Overrides:
containsKeyin classHashtable<String,Object> - Parameters:
key- the property name to look up- Returns:
trueif the key is present
-
containsValue
Indicates whether the delegated property set contains the supplied value.- Specified by:
containsValuein interfaceMap<String,Object> - Overrides:
containsValuein classHashtable<String,Object> - Parameters:
value- the value to look up- Returns:
trueif the value is present
-
equals
Compares this delegate with another object using the delegated property map. -
toString
Returns the string form of the delegated property map. -
values
Returns the current property values. -
elements
Returns an enumeration over the current property values. -
keys
Returns an enumeration over the current property names. -
putAll
Copies every supplied property into the owning Ant project. -
entrySet
Returns the delegated entry-set view. -
keySet
Returns the delegated key-set view. -
get
Returns the current value of the supplied property. -
remove
-
put
Stores the supplied property value through the owning Ant project.
-