public class LocalPropertyList extends java.lang.Object implements PropertyInfoList
Constructor and Description |
---|
LocalPropertyList() |
LocalPropertyList(PropertyList classProps) |
Modifier and Type | Method and Description |
---|---|
void |
add(PropertyInfo info) |
PropertyDesc |
add(java.lang.String name,
java.lang.String methods,
java.lang.Object key,
java.lang.String description,
java.lang.Object defaultValue) |
PropertyDesc |
add(java.lang.String name,
java.lang.String methods,
java.lang.Object key,
java.lang.String description,
java.lang.Object defaultValue,
java.lang.String options) |
PropertyInfo |
get(java.lang.String name)
Gets information for a specific named property.
|
boolean |
hasNoInheritableProperties()
Returns tree if any properties in this list are inheritable.
|
java.util.Iterator<PropertyInfo> |
iterator()
Returns an iterator over all PropertyInfo structures contained in this
list.
|
boolean |
remove(java.lang.String name) |
int |
size()
Returns the number of properties described in this list.
|
boolean |
writeNonDefaultProps(HasProperties host,
java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
Writes properties in this list whose current values differ from their
default values to a PrintWriter.
|
public LocalPropertyList(PropertyList classProps)
public LocalPropertyList()
public PropertyInfo get(java.lang.String name)
PropertyInfoList
null
is returned.get
in interface PropertyInfoList
name
- name of the propertypublic java.util.Iterator<PropertyInfo> iterator()
PropertyInfoList
iterator
in interface java.lang.Iterable<PropertyInfo>
iterator
in interface PropertyInfoList
public int size()
PropertyInfoList
size
in interface PropertyInfoList
public boolean hasNoInheritableProperties()
PropertyInfoList
hasNoInheritableProperties
in interface PropertyInfoList
public PropertyDesc add(java.lang.String name, java.lang.String methods, java.lang.Object key, java.lang.String description, java.lang.Object defaultValue, java.lang.String options)
public PropertyDesc add(java.lang.String name, java.lang.String methods, java.lang.Object key, java.lang.String description, java.lang.Object defaultValue)
public void add(PropertyInfo info)
public boolean remove(java.lang.String name)
public boolean writeNonDefaultProps(HasProperties host, java.io.PrintWriter pw, NumberFormat fmt, java.lang.Object ref) throws java.io.IOException
PropertyList.writeProps(maspack.properties.HasProperties, java.io.PrintWriter, maspack.util.NumberFormat, java.lang.Object)
; in particular only those
properties for which PropertyInfo.getAutoWrite
returns true are written.writeNonDefaultProps
in interface PropertyInfoList
host
- class exporting the propertiespw
- PrintWriter to which properties are writtenfmt
- Numeric formatting information. This is only used when the value to be
written is itself Scannable
, in which case
it is passed to that value's write
method.ref
- Reference object. This is only used when the value to be
written is itself Scannable
, in which case
it is passed to that value's write
method.java.io.IOException
- if an I/O error occurred writing to the stream