Class DimensionSet
- java.lang.Object
-
- software.amazon.cloudwatchlogs.emf.model.DimensionSet
-
public class DimensionSet extends java.lang.ObjectA combination of dimension values.
-
-
Constructor Summary
Constructors Constructor Description DimensionSet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DimensionSetadd(DimensionSet other)Add a dimension set with current dimension set and return a new dimension set from combining the two dimension sets.voidaddDimension(java.lang.String dimension, java.lang.String value)Add another dimension entry to this DimensionSet.java.util.Set<java.lang.String>getDimensionKeys()java.lang.StringgetDimensionValue(java.lang.String key)static DimensionSetof(java.lang.String d1, java.lang.String v1)Return a dimension set that contains a single pair of key-value.static DimensionSetof(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2)Return a dimension set that contains two entries.static DimensionSetof(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2, java.lang.String d3, java.lang.String v3)Return a dimension set that contains three entries.static DimensionSetof(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2, java.lang.String d3, java.lang.String v3, java.lang.String d4, java.lang.String v4)Return a dimension set that contains four entries.static DimensionSetof(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2, java.lang.String d3, java.lang.String v3, java.lang.String d4, java.lang.String v4, java.lang.String d5, java.lang.String v5)Return a dimension set that contains five entries.
-
-
-
Method Detail
-
of
public static DimensionSet of(java.lang.String d1, java.lang.String v1) throws InvalidDimensionException, DimensionSetExceededException
Return a dimension set that contains a single pair of key-value.- Parameters:
d1- Name of the single dimensionv1- Value of the single dimension- Returns:
- a DimensionSet from the parameters
- Throws:
InvalidDimensionException- if the dimension name or value is invalidDimensionSetExceededException- if the number of dimensions exceeds the limit
-
of
public static DimensionSet of(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2) throws InvalidDimensionException, DimensionSetExceededException
Return a dimension set that contains two entries.- Parameters:
d1- Name of the first dimensionv1- Value of the first dimensiond2- Name of the second dimensionv2- Value of the second dimension- Returns:
- a DimensionSet from the parameters
- Throws:
InvalidDimensionException- if the dimension name or value is invalidDimensionSetExceededException- if the number of dimensions exceeds the limit
-
of
public static DimensionSet of(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2, java.lang.String d3, java.lang.String v3) throws InvalidDimensionException, DimensionSetExceededException
Return a dimension set that contains three entries.- Parameters:
d1- Name of the first dimensionv1- Value of the first dimensiond2- Name of the second dimensionv2- Value of the second dimensiond3- Name of the third dimensionv3- Value of the third dimension- Returns:
- a DimensionSet from the parameters
- Throws:
InvalidDimensionException- if the dimension name or value is invalidDimensionSetExceededException- if the number of dimensions exceeds the limit
-
of
public static DimensionSet of(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2, java.lang.String d3, java.lang.String v3, java.lang.String d4, java.lang.String v4) throws InvalidDimensionException, DimensionSetExceededException
Return a dimension set that contains four entries.- Parameters:
d1- Name of the first dimensionv1- Value of the first dimensiond2- Name of the second dimensionv2- Value of the second dimensiond3- Name of the third dimensionv3- Value of the third dimensiond4- Name of the fourth dimensionv4- Value of the fourth dimension- Returns:
- a DimensionSet from the parameters
- Throws:
InvalidDimensionException- if the dimension name or value is invalidDimensionSetExceededException- if the number of dimensions exceeds the limit
-
of
public static DimensionSet of(java.lang.String d1, java.lang.String v1, java.lang.String d2, java.lang.String v2, java.lang.String d3, java.lang.String v3, java.lang.String d4, java.lang.String v4, java.lang.String d5, java.lang.String v5) throws InvalidDimensionException, DimensionSetExceededException
Return a dimension set that contains five entries.- Parameters:
d1- Name of the first dimensionv1- Value of the first dimensiond2- Name of the second dimensionv2- Value of the second dimensiond3- Name of the third dimensionv3- Value of the third dimensiond4- Name of the fourth dimensionv4- Value of the fourth dimensiond5- Name of the fifth dimensionv5- Value of the fifth dimension- Returns:
- a DimensionSet from the parameters
- Throws:
InvalidDimensionException- if the dimension name or value is invalidDimensionSetExceededException- if the number of dimensions exceeds the limit
-
addDimension
public void addDimension(java.lang.String dimension, java.lang.String value) throws InvalidDimensionException, DimensionSetExceededExceptionAdd another dimension entry to this DimensionSet.- Parameters:
dimension- Name of the dimensionvalue- Value of the dimension- Throws:
InvalidDimensionException- if the dimension name or value is invalidDimensionSetExceededException- if the number of dimensions exceeds the limit
-
add
public DimensionSet add(DimensionSet other) throws DimensionSetExceededException
Add a dimension set with current dimension set and return a new dimension set from combining the two dimension sets.- Parameters:
other- Other dimension sets to merge with current- Returns:
- a new DimensionSet from combining the current DimensionSet with other
- Throws:
DimensionSetExceededException- if the number of dimensions exceeds the limit
-
getDimensionKeys
public java.util.Set<java.lang.String> getDimensionKeys()
- Returns:
- all the dimension names in the dimension set.
-
getDimensionValue
public java.lang.String getDimensionValue(java.lang.String key)
- Parameters:
key- the name of the dimension- Returns:
- the dimension value associated with a dimension key.
-
-