asia.redact.bracket.properties
Class ValueModel

java.lang.Object
  extended by asia.redact.bracket.properties.ValueModel

public class ValueModel
extends Object

 Representation of values which accounts better for the actual complexity of a potential properties value.
 
 Note that we consider comments to be a part of the value. This is not really correct,
 but it generally works because there is a one to many relation between a key and 
 a set of comments. Only comments above the key/value pair are considered part of the set
 
 
 

Author:
Dave

Field Summary
protected  List<String> comments
           
(package private) static String lineSeparator
           
protected  char separator
           
protected  List<String> values
           
 
Constructor Summary
ValueModel()
           
ValueModel(List<String> comments, List<String> values)
           
ValueModel(String... value)
           
 
Method Summary
 void addComment(String comment)
           
 void addValue(String value)
           
 void clearComments()
           
 boolean equals(Object obj)
           
 List<String> getComments()
           
 char getSeparator()
           
 String getValue()
           
 List<String> getValues()
           
 int hashCode()
           
 void setSeparator(char separator)
           
 String toString()
           
 String toXML(int spaces)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

lineSeparator

static final String lineSeparator

comments

protected final List<String> comments

values

protected final List<String> values

separator

protected char separator
Constructor Detail

ValueModel

public ValueModel()

ValueModel

public ValueModel(String... value)

ValueModel

ValueModel(List<String> comments,
           List<String> values)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getSeparator

public char getSeparator()

setSeparator

public void setSeparator(char separator)

getComments

public List<String> getComments()

getValues

public List<String> getValues()

addValue

public void addValue(String value)

addComment

public void addComment(String comment)

clearComments

public void clearComments()

getValue

public String getValue()

toString

public String toString()
Overrides:
toString in class Object

toXML

public String toXML(int spaces)


Copyright © 2011-2013 David R. Smith. All Rights Reserved.