Package com.piketec.tpt.api.properties
Class PropertyList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<Property>
-
- com.piketec.tpt.api.properties.PropertyList
-
- All Implemented Interfaces:
Property
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<Property>
,java.util.Collection<Property>
,java.util.List<Property>
,java.util.RandomAccess
public class PropertyList extends java.util.ArrayList<Property> implements Property
A list of properties- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertyList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(boolean value)
Shorthand foradd(new PropertyBool(value))
void
add(double value)
Shorthand foradd(new PropertyDecimal(value))
void
add(int value)
Shorthand foradd(new PropertyInt(value))
void
add(long value)
Shorthand foradd(new PropertyLong(value))
void
add(java.lang.String value)
Shorthand foradd(new PropertyString(value))
PropertyList
addList()
Shorthand foradd(new PropertyList())
PropertyMap
addMap()
Shorthand foradd(new PropertyMap())
void
set(int index, boolean value)
Shorthand foradd(new PropertyBool(value))
void
set(int index, double value)
Shorthand foradd(new PropertyDecimal(value))
void
set(int index, int value)
Shorthand foradd(new PropertyInt(value))
void
set(int index, long value)
Shorthand foradd(new PropertyLong(value))
void
set(int index, java.lang.String value)
Shorthand foradd(new PropertyString(value))
void
setList(int index)
Shorthand foradd(new PropertyList())
void
setMap(int index)
Shorthand foradd(new PropertyMap())
java.lang.String
toString()
void
toString(java.lang.StringBuffer buffer, java.lang.String indentation)
Fills the givenStringBuffer
with a clear String-representation of all (possibly nested) property values of thisProperty
object.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.util.AbstractCollection<Property>
-
add
public void add(boolean value)
Shorthand foradd(new PropertyBool(value))
- Parameters:
value
- The boolean value that shall be added.
-
add
public void add(double value)
Shorthand foradd(new PropertyDecimal(value))
- Parameters:
value
- The double value that shall be added.
-
add
public void add(int value)
Shorthand foradd(new PropertyInt(value))
- Parameters:
value
- The integer property value that shall be added.
-
add
public void add(long value)
Shorthand foradd(new PropertyLong(value))
- Parameters:
value
- The long integer property value that shall be added.
-
add
public void add(java.lang.String value)
Shorthand foradd(new PropertyString(value))
- Parameters:
value
- TheString
property value that shall be added.
-
addList
public PropertyList addList()
Shorthand foradd(new PropertyList())
- Returns:
- the new
PropertyList
-
addMap
public PropertyMap addMap()
Shorthand foradd(new PropertyMap())
- Returns:
- the new
PropertyMap
-
set
public void set(int index, boolean value)
Shorthand foradd(new PropertyBool(value))
- Parameters:
index
- the position in the list where the element should be added.value
- The boolean value that shall be added.
-
set
public void set(int index, double value)
Shorthand foradd(new PropertyDecimal(value))
- Parameters:
index
- the position in the list where the element should be added.value
- The double value that shall be added.
-
set
public void set(int index, int value)
Shorthand foradd(new PropertyInt(value))
- Parameters:
index
- the position in the list where the element should be added.value
- The integer property value that shall be added.
-
set
public void set(int index, long value)
Shorthand foradd(new PropertyLong(value))
- Parameters:
index
- the position in the list where the element should be added.value
- The long integer property value that shall be added.
-
set
public void set(int index, java.lang.String value)
Shorthand foradd(new PropertyString(value))
- Parameters:
index
- the position in the list where the element should be added.value
- TheString
property value that shall be added.
-
setList
public void setList(int index)
Shorthand foradd(new PropertyList())
- Parameters:
index
- the position in the list where the new list should be added
-
setMap
public void setMap(int index)
Shorthand foradd(new PropertyMap())
- Parameters:
index
- the position in the list where the map should be added
-
toString
public void toString(java.lang.StringBuffer buffer, java.lang.String indentation)
Description copied from interface:Property
Fills the givenStringBuffer
with a clear String-representation of all (possibly nested) property values of thisProperty
object.For that, the given String
indentation
is used initially and each additional element is shifted by additional whitespaces.
-
-