|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttuwien.auto.calimero.datapoint.DatapointMap
public class DatapointMap
A datapoint model storing datapoints with no defined order or hierarchy using a map implementation.
| Constructor Summary | |
|---|---|
DatapointMap()
Creates a new empty datapoint map. |
|
DatapointMap(java.util.Collection datapoints)
Creates a new datapoint map and adds all datapoints to the map. |
|
| Method Summary | |
|---|---|
void |
add(Datapoint dp)
Adds a datapoint to this model. |
boolean |
contains(Datapoint dp)
Checks whether this model contains the specified datapoint. |
boolean |
contains(GroupAddress main)
Checks whether this model contains the datapoint identified using the specified main address. |
Datapoint |
get(GroupAddress main)
Returns the datapoint identified using the specified main address,
if found in this model. |
java.util.Collection |
getDatapoints()
Returns all datapoints currently contained in this map. |
void |
load(XMLReader r)
Loads a datapoint model from XML input into this model. |
void |
remove(Datapoint dp)
Removes the specified datapoint from this model, if that datapoint is found. |
void |
removeAll()
Removes all datapoints contained in this model. |
void |
save(XMLWriter w)
Saves the datapoint model to XML using the supplied writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatapointMap()
public DatapointMap(java.util.Collection datapoints)
datapoints to the map.
A datapoint to be added has to be unique according its main address, the attempt to add two datapoints using the same main address results in a KNXIllegalArgumentException.
datapoints - collection with entries of type Datapoint
KNXIllegalArgumentException - on duplicate datapoint| Method Detail |
|---|
public void add(Datapoint dp)
DatapointModelAn implementation might throw KNXIllegalArgumentException if tried to add a duplicate datapoint.
add in interface DatapointModeldp - datapoint to addpublic boolean contains(Datapoint dp)
DatapointModel
contains in interface DatapointModeldp - datapoint to look up
true iff such datapoint is found, false
otherwisepublic boolean contains(GroupAddress main)
DatapointModelmain address.
contains in interface DatapointModelmain - KNX group address to look up
true iff such datapoint is found, false
otherwisepublic Datapoint get(GroupAddress main)
DatapointModelmain address,
if found in this model.
If no datapoint is found with that address, null is returned.
get in interface DatapointModelmain - KNX group address to get the datapoint for
nullpublic java.util.Collection getDatapoints()
Datapoint
public void load(XMLReader r)
throws KNXMLException
DatapointModelDatapoints already contained in this model are not required to be removed before loading, the loaded model will be added to the already existing datapoints.
load in interface DatapointModelr - a XML reader
KNXMLException - on error loading the datapoint model, or on duplicate loaded
datapointpublic void remove(Datapoint dp)
DatapointModel
remove in interface DatapointModeldp - datapoint to removepublic void removeAll()
DatapointModel
removeAll in interface DatapointModel
public void save(XMLWriter w)
throws KNXMLException
DatapointModel
save in interface DatapointModelw - a XML writer
KNXMLException - on error saving the datapoint model
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||