com.triadsoft.common.properties
Class PropertyCategory
java.lang.Object
com.triadsoft.common.properties.PropertyElement
com.triadsoft.common.properties.PropertyCategory
public class PropertyCategory
- extends PropertyElement
Clase que modela una categoria. Una categoria dentro de un archivo de
propiedades es un agrupamiento de las claves y valores delimitado por los
comentarios hechos dentro del archivo de propiedades. El contenido entre
comentarios, es parseado dentro de la categoria, y ésta toma como nombre el
comentatio utilizado.
La idea de las categorias no es mia, sino que fue tomada del ejemplo del
libro Eclipse
Plugins
- Author:
- Triad (flores.leonardo@triadsoft.com.ar)
- See Also:
- Eclipse
Plugins
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PropertyCategory
public PropertyCategory(PropertyFile parent,
java.lang.String name)
PropertyCategory
public PropertyCategory(PropertyFile parent,
java.io.LineNumberReader reader)
throws java.io.IOException
- Throws:
java.io.IOException
getName
public java.lang.String getName()
getEntries
public java.util.Collection<PropertyEntry> getEntries()
getEntry
public PropertyEntry getEntry(java.lang.String entryKey)
getChildren
public PropertyElement[] getChildren()
- Specified by:
getChildren
in class PropertyElement
setName
public void setName(java.lang.String text)
addEntry
public void addEntry(PropertyEntry entry)
removeEntry
public void removeEntry(PropertyEntry entry)
removeFromParent
public void removeFromParent()
- Specified by:
removeFromParent
in class PropertyElement
keyChanged
public void keyChanged(PropertyEntry entry)
valueChanged
public void valueChanged(PropertyEntry entry)
hasChildren
public boolean hasChildren()
- Specified by:
hasChildren
in class PropertyElement
- See Also:
PropertyElement.hasChildren()
appendText
public void appendText(java.io.PrintWriter writer)
existEntry
public boolean existEntry(java.lang.String entryValue)
- Devuelve un booleano que indica si la clave existe en esta categoria
- Parameters:
entryValue
-
- Returns:
- Boolean TRUE o FALSE
getLine
public int getLine()
- Specified by:
getLine
in class PropertyElement
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object