public class Dimension
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
The Dimension
data type further expands on the identity of a
metric using a Name, Value pair.
For examples that use one or more dimensions, see PutMetricData.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name
The name of the dimension.
|
private java.lang.String |
value
The value representing the dimension measurement
|
Constructor and Description |
---|
Dimension() |
Modifier and Type | Method and Description |
---|---|
Dimension |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getName()
The name of the dimension.
|
java.lang.String |
getValue()
The value representing the dimension measurement
|
int |
hashCode() |
void |
setName(java.lang.String name)
The name of the dimension.
|
void |
setValue(java.lang.String value)
The value representing the dimension measurement
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Dimension |
withName(java.lang.String name)
The name of the dimension.
|
Dimension |
withValue(java.lang.String value)
The value representing the dimension measurement
|
private java.lang.String name
The name of the dimension.
private java.lang.String value
The value representing the dimension measurement
public void setName(java.lang.String name)
The name of the dimension.
name
- The name of the dimension.public java.lang.String getName()
The name of the dimension.
public Dimension withName(java.lang.String name)
The name of the dimension.
name
- The name of the dimension.public void setValue(java.lang.String value)
The value representing the dimension measurement
value
- The value representing the dimension measurementpublic java.lang.String getValue()
The value representing the dimension measurement
public Dimension withValue(java.lang.String value)
The value representing the dimension measurement
value
- The value representing the dimension measurementpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Dimension clone()
clone
in class java.lang.Object