public class PropertiesImpl extends AbstractExtensionData implements MutableProperties
Constructor and Description |
---|
PropertiesImpl()
Constructor.
|
PropertiesImpl(Collection<PropertyData<?>> properties)
Constructor.
|
PropertiesImpl(Properties properties)
Shallow copy constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addProperties(Collection<PropertyData<?>> properties) |
void |
addProperty(PropertyData<?> property)
Adds a property to the end of the property list.
|
Map<String,PropertyData<?>> |
getProperties()
Returns a map of properties (property ID => property).
|
List<PropertyData<?>> |
getPropertyList()
Returns the list of properties.
|
void |
removeProperty(String id)
Removes a property.
|
void |
replaceProperty(PropertyData<?> property)
Replaces a property.
|
String |
toString() |
getExtensions, setExtensions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getExtensions, setExtensions
public PropertiesImpl()
public PropertiesImpl(Collection<PropertyData<?>> properties)
properties
- initial collection of propertiespublic PropertiesImpl(Properties properties)
public Map<String,PropertyData<?>> getProperties()
Properties
This method should not be used with queries because some repositories don't set property IDs, and because when dealing with queries the proper key is usually the query name (when using JOINs, several properties with the same ID may be returned).
getProperties
in interface Properties
null
public List<PropertyData<?>> getPropertyList()
Properties
getPropertyList
in interface Properties
null
protected void addProperties(Collection<PropertyData<?>> properties)
public void addProperty(PropertyData<?> property)
MutableProperties
addProperty
in interface MutableProperties
property
- the property, null
values are ignoredpublic void replaceProperty(PropertyData<?> property)
MutableProperties
Removes the property from the property list if it exists and adds the new version to the end of the property list.
replaceProperty
in interface MutableProperties
property
- the property, null
values are ignoredpublic void removeProperty(String id)
MutableProperties
removeProperty
in interface MutableProperties
id
- the property ID, null
values are ignoredpublic String toString()
toString
in class AbstractExtensionData
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.