public class ThingAttribute extends Object implements Serializable
Describes a thing attribute.
| Constructor and Description |
|---|
ThingAttribute() |
| Modifier and Type | Method and Description |
|---|---|
ThingAttribute |
addAttributesEntry(String key,
String value)
The attributes.
|
ThingAttribute |
clearAttributesEntries()
Removes all the entries added into Attributes.
|
boolean |
equals(Object obj) |
Map<String,String> |
getAttributes()
The attributes.
|
String |
getThingName()
The name of the thing.
|
int |
hashCode() |
void |
setAttributes(Map<String,String> attributes)
The attributes.
|
void |
setThingName(String thingName)
The name of the thing.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ThingAttribute |
withAttributes(Map<String,String> attributes)
The attributes.
|
ThingAttribute |
withThingName(String thingName)
The name of the thing.
|
public String getThingName()
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_-]+
public void setThingName(String thingName)
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_-]+
thingName - The name of the thing.public ThingAttribute withThingName(String thingName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_-]+
thingName - The name of the thing.public void setAttributes(Map<String,String> attributes)
attributes - The attributes.public ThingAttribute withAttributes(Map<String,String> attributes)
Returns a reference to this object so that method calls can be chained together.
attributes - The attributes.public ThingAttribute addAttributesEntry(String key, String value)
The method adds a new key-value pair into Attributes parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into Attributes.value - The corresponding value of the entry to be added into Attributes.public ThingAttribute clearAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public String toString()
toString in class ObjectObject.toString()Copyright © 2016. All rights reserved.