|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteasik.sketch.util.ini.IniFileNode
public class IniFileNode
Class used to keep information stored under a particular header of an ini file
Field Summary | |
---|---|
private java.util.HashMap<java.lang.String,java.lang.String> |
_items
Hash map of items stored in the node, indexed by the name of the item |
private java.lang.String |
_title
The name of the header |
Constructor Summary | |
---|---|
IniFileNode(java.lang.String title)
Default constructor |
Method Summary | |
---|---|
boolean |
addItem(java.lang.String name,
java.lang.String value)
Adds a new item to this header. |
boolean |
changeItem(java.lang.String name,
java.lang.String value)
Changes the value of an item |
void |
erase()
Clears all the items from the header |
java.util.HashMap<java.lang.String,java.lang.String> |
getAllItems()
Returns the HashMap of all items |
java.lang.String |
getItem(java.lang.String name)
Returns the item given by the name |
java.lang.String |
getTitle()
Returns the name of this header |
int |
numItems()
Returns the number of items in this header |
boolean |
removeItem(java.lang.String name)
Removes an item from the header |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String _title
private java.util.HashMap<java.lang.String,java.lang.String> _items
Constructor Detail |
---|
public IniFileNode(java.lang.String title)
title
- The name of this headerMethod Detail |
---|
public java.lang.String getTitle()
public int numItems()
public boolean addItem(java.lang.String name, java.lang.String value)
name
- The name of the new itemvalue
- The value of the new item
public java.lang.String getItem(java.lang.String name)
name
- The name of the item to be returned
public java.util.HashMap<java.lang.String,java.lang.String> getAllItems()
public boolean changeItem(java.lang.String name, java.lang.String value)
name
- The name of the item to be changedvalue
- The value of the item to be changed
public boolean removeItem(java.lang.String name)
name
- The name of the item to be removed
public void erase()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |