org.apache.velocity.tools.config
public class Configuration extends java.lang.Object implements java.lang.Comparable<Configuration>
This base configuration class manages a set of Property
s
for whatever thing the instance of this class represents. When
combined with another Configuration
instance via
addConfiguration(org.apache.velocity.tools.config.Configuration)
, the Property
s of both instances are
combined.
NOTE: Though this class appears Comparable
,
the compareTo(org.apache.velocity.tools.config.Configuration)
method is unsupported. Proper comparison is
left up to subclasses.
Modifier and Type | Field and Description |
---|---|
private java.util.SortedSet<Property> |
properties |
Constructor and Description |
---|
Configuration() |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguration(Configuration config) |
void |
addProperty(Property property) |
protected void |
appendProperties(java.lang.StringBuilder out) |
int |
compareTo(Configuration config) |
boolean |
equals(java.lang.Object obj) |
java.util.SortedSet<Property> |
getProperties() |
Property |
getProperty(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.Object> |
getPropertyMap() |
int |
hashCode() |
boolean |
hasProperties() |
boolean |
removeProperty(Property property) |
boolean |
removeProperty(java.lang.String name) |
void |
setProperties(java.util.Collection<Property> props) |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setPropertyMap(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
validate() |
private final java.util.SortedSet<Property> properties
public void addProperty(Property property)
public boolean removeProperty(Property property)
public void setProperty(java.lang.String name, java.lang.Object value)
public boolean removeProperty(java.lang.String name)
public boolean hasProperties()
public Property getProperty(java.lang.String name)
public java.util.SortedSet<Property> getProperties()
public java.util.Map<java.lang.String,java.lang.Object> getPropertyMap()
public void setPropertyMap(java.util.Map<java.lang.String,java.lang.Object> props)
public void setProperties(java.util.Collection<Property> props)
public void addConfiguration(Configuration config)
public void validate()
public int compareTo(Configuration config)
compareTo
in interface java.lang.Comparable<Configuration>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
protected void appendProperties(java.lang.StringBuilder out)
Copyright (c) 2003-2007 Apache Software Foundation