public class Configuration extends Object implements 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.
Constructor and Description |
---|
Configuration() |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguration(Configuration config) |
void |
addProperty(Property property) |
protected void |
appendProperties(StringBuilder out) |
int |
compareTo(Configuration config) |
boolean |
equals(Object obj) |
SortedSet<Property> |
getProperties() |
Property |
getProperty(String name) |
Map<String,Object> |
getPropertyMap() |
int |
hashCode() |
boolean |
hasProperties() |
boolean |
removeProperty(Property property) |
boolean |
removeProperty(String name) |
void |
setProperties(Collection<Property> props) |
void |
setProperty(String name,
Object value) |
void |
setPropertyMap(Map<String,Object> props) |
void |
validate() |
public void addProperty(Property property)
public boolean removeProperty(Property property)
public boolean removeProperty(String name)
public boolean hasProperties()
public void setProperties(Collection<Property> props)
public void addConfiguration(Configuration config)
public void validate()
public int compareTo(Configuration config)
compareTo
in interface Comparable<Configuration>
protected void appendProperties(StringBuilder out)
Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.