|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.propertyfile.content.PropertyFileContent
public class PropertyFileContent
| Field Summary | |
|---|---|
protected List<Element> |
elementList
|
protected IndexManager |
indexManager
|
protected String |
lineSeparator
|
| Constructor Summary | |
|---|---|
PropertyFileContent()
|
|
| Method Summary | |
|---|---|
void |
appendElement(Element element)
|
void |
clear()
Clears all Element instances from this PropertyFileContent instance. |
Element |
getElementByIndexPosition(int index)
Returns the element at the given index position. |
List<Element> |
getElementList()
Gets a new list instance of all Elements managed by this PropertyFileContent instance. |
List<Element> |
getElementListAscendingByIndexPosition()
Returns a new list instance of all Elements managed by this PropertyFileContent instance sorted in ascending
order by their index position (which has the same order as the line numbers). |
String |
getLineSeparator()
|
List<Property> |
getPropertyList()
Returns a new list instance containing all Property instances. |
PropertyMap |
getPropertyMap()
Returns a PropertyMap view on the Property elements of this PropertyFileContent instance. |
boolean |
hasProperty(Property property)
Returns true if the same Property is present. |
boolean |
hasPropertyKey(String propertyKey)
Returns true if a Property with the given key exists. |
boolean |
hasPropertyKeyAndValueList(String propertyKey,
List<String> propertyValueList)
Returns true if a Property with the given key exists. |
boolean |
hasPropertyWithSameKeyAndValue(Property property)
Returns true if the same Property is present. |
void |
insertElementAfter(Element element,
Element elementBefore)
|
void |
removeElement(Element element)
|
void |
replaceElement(Element elementOld,
Element elementNew)
Replaces an old Element by a new Element. |
void |
setLineSeparator(String lineSeparator)
|
int |
size()
Returns the number of Elements. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected List<Element> elementList
protected IndexManager indexManager
protected String lineSeparator
| Constructor Detail |
|---|
public PropertyFileContent()
| Method Detail |
|---|
public List<Element> getElementList()
Elements managed by this PropertyFileContent instance.
public List<Element> getElementListAscendingByIndexPosition()
Elements managed by this PropertyFileContent instance sorted in ascending
order by their index position (which has the same order as the line numbers).
public List<Property> getPropertyList()
Property instances.
public void appendElement(Element element)
public void insertElementAfter(Element element,
Element elementBefore)
public int size()
Elements.
public Element getElementByIndexPosition(int index)
index -
public void removeElement(Element element)
public void clear()
Element instances from this PropertyFileContent instance.
public void replaceElement(Element elementOld,
Element elementNew)
Element by a new Element. The new Element will have the same Index / line
position as the old Element before.
elementOld - elementNew - public PropertyMap getPropertyMap()
PropertyMap view on the Property elements of this PropertyFileContent instance. The map is
backed by the PropertyFileContent and modifications to it will modify the PropertyFileContent, too, and vice
versa.
PropertyMappublic boolean hasPropertyKey(String propertyKey)
Property with the given key exists.
propertyKey -
public boolean hasPropertyKeyAndValueList(String propertyKey,
List<String> propertyValueList)
Property with the given key exists.
propertyKey - propertyValueList -
public boolean hasProperty(Property property)
Property is present. Uses Property.equals(Object) comparison.
property -
hasProperty(Property)public boolean hasPropertyWithSameKeyAndValue(Property property)
Property is present. Uses Property.equalsInKeyAndValue(Object) comparison.
property -
hasPropertyKey(String)public String getLineSeparator()
public void setLineSeparator(String lineSeparator)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||