public class ListLine extends Line implements IBasicList
| Modifier and Type | Field and Description |
|---|---|
protected List<?> |
cached |
protected Class<?> |
cacheType |
protected List<CharSequence> |
entries |
| Constructor and Description |
|---|
ListLine(String path,
boolean shortlist) |
| Modifier and Type | Method and Description |
|---|---|
ListLine |
addEntries(Iterable<?> entries) |
ListLine |
addEntries(String entries) |
void |
addEntry(CharSequence entry) |
void |
clear(boolean removeComments) |
boolean |
equals(Object obj) |
List<Boolean> |
getBooleanList()
Gets the value of this line as a List of Booleans.
Will convert all applicable values into Booleans. |
List<Byte> |
getByteList()
Gets the value of this line as a List of Bytes.
Will convert all applicable values into Bytes. |
List<Character> |
getCharacterList()
Gets the value of this line as a List of Characters.
Will convert all applicable values into Characters. |
List<Comment> |
getComments()
Returns a list with all the comments that are inside of this ListLine.
|
protected IConverter |
getConverter() |
List<Double> |
getDoubleList()
Gets the value of this line as a List of Doubles.
Will convert all applicable values into Doubles. |
List<Float> |
getFloatList()
Gets the value of this line as a List of Floats.
Will convert all applicable values into Floats. |
List<Integer> |
getIntegerList()
Gets the value of this line as a List of Integers.
Will convert all applicable values into Integers. |
List<Long> |
getLongList()
Gets the value of this line as a List of Longs.
Will convert all applicable values into Longs. |
List<Object> |
getMixedList()
Converts whole numbers into Integers or Longs (whichever fits best)
Converts floating point numbers into Doubles Converts true, false, yes and no into their respective Boolean values |
String |
getName()
Returns the name of this line.
The specific meaning differs between the different types of lines. |
List<Short> |
getShortList()
Gets the value of this line as a List of Shorts.
Will convert all applicable values into Shorts. |
List<String> |
getStringList()
Gets the value of this line as a List of Strings.
|
<T> List<T> |
getTList(Class<T> clazz)
Gets the value of this line as a List of T
If the value at the path does not exist or is not a List of T, this will return an empty list. |
int |
hashCode() |
boolean |
isShortType() |
List<Comment> |
separateLastComments()
Removes the comments from the end of the list and returns them.
|
void |
setEntries(Iterable<?> entries,
boolean keepComments,
boolean keepCommentPosition) |
void |
setShortType(boolean value) |
String |
toSave() |
StringBuilder |
toSave(StringBuilder b) |
String |
toString() |
protected Class<?> cacheType
protected List<?> cached
protected List<CharSequence> entries
public ListLine(String path, boolean shortlist)
path - - The path of this list.shortlist - - If this list is of the short type.IllegalArgumentException - If path is null, empty or ends with a dot.public final List<Byte> getByteList()
IBasicListgetByteList in interface IBasicListpublic final List<Short> getShortList()
IBasicListgetShortList in interface IBasicListpublic final List<Integer> getIntegerList()
IBasicListgetIntegerList in interface IBasicListpublic final List<Long> getLongList()
IBasicListgetLongList in interface IBasicListpublic final List<Float> getFloatList()
IBasicListgetFloatList in interface IBasicListpublic final List<Double> getDoubleList()
IBasicListgetDoubleList in interface IBasicListpublic final List<Boolean> getBooleanList()
IBasicListgetBooleanList in interface IBasicListpublic final List<Character> getCharacterList()
IBasicListgetCharacterList in interface IBasicListpublic List<String> getStringList()
IBasicListgetStringList in interface IBasicListpublic List<Object> getMixedList()
IBasicListgetMixedList in interface IBasicListpublic <T> List<T> getTList(Class<T> clazz)
IBasicListgetTList in interface IBasicListclazz - - The class of the type you want to get.public final List<Comment> getComments()
IBasicListgetComments in interface IBasicListCommentsprotected IConverter getConverter()
public final StringBuilder toSave(StringBuilder b)
public String getName()
LineCommentLine - nullEmptyLine - nullpublic void addEntry(CharSequence entry)
public void setEntries(Iterable<?> entries, boolean keepComments, boolean keepCommentPosition)
public final void clear(boolean removeComments)
removeComments - - Should comments be removed as well?public final List<Comment> separateLastComments()
public final boolean isShortType()
public void setShortType(boolean value)
Copyright © 2014. All rights reserved.