public class SensorGroup extends Object implements IDomainModel
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
sensors
The List of sensors the compose this group.
|
Modifier | Constructor and Description |
---|---|
protected |
SensorGroup()
Hide the default constructor.
|
|
SensorGroup(String name,
Set<String> sensors,
String ownerId)
Create a new SensorGroup with the given unique id.
|
|
SensorGroup(String id,
String name,
Set<String> sensors,
String ownerId)
Create a new SensorGroup with the given unique id.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(String sensorId) |
boolean |
contains(Object o) |
boolean |
equals(Object obj) |
String |
getId()
The slug is the name of the instance lower-cased, spaces replaced with '-',
and special characters removed.
|
String |
getName() |
String |
getOrganizationId() |
Set<String> |
getSensors() |
int |
hashCode() |
boolean |
remove(Object o) |
void |
setId(String id)
Sets the instance's slug.
|
void |
setName(String name)
Sets the name of the instance.
|
void |
setOrganizationId(String owner)
Sets the id of the owner of this instance.
|
void |
setSensors(Set<String> sensors) |
String |
toString() |
protected SensorGroup()
public SensorGroup(String name, Set<String> sensors, String ownerId)
name
- The name.sensors
- The set of sensors in the group.ownerId
- the id of the owner of the SensorGroup.public boolean add(String sensorId)
sensorId
- The id of the sensor to add.List.add(java.lang.Object)
public boolean contains(Object o)
o
- The Sensor to test.List.contains(java.lang.Object)
public String getId()
IDomainModel
getId
in interface IDomainModel
public String getName()
getName
in interface IDomainModel
public String getOrganizationId()
getOrganizationId
in interface IDomainModel
public boolean remove(Object o)
o
- The Sensor to remove.List.remove(java.lang.Object)
public void setId(String id) throws BadSlugException
IDomainModel
setId
in interface IDomainModel
id
- the id to setBadSlugException
- if the id isn't valid.public void setName(String name)
IDomainModel
setName
in interface IDomainModel
name
- the name to setpublic void setOrganizationId(String owner)
IDomainModel
setOrganizationId
in interface IDomainModel
owner
- the id of the owner to setCopyright © 2015 Collaborative Software Development Laboratory. All rights reserved.