public class DimensionValues extends Object implements Comparable<DimensionValues>
Modifier and Type | Field and Description |
---|---|
static DimensionValues |
empty |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
asContext(List<String> dimensions) |
int |
compareTo(DimensionValues other)
Implements the sort order of this which is based on specificity
where dimensions to the left are more significant:
-1 is returned if this is more specific than other,
1 is returned if other is more specific than this,
0 is returned if none is more specific than the other.
|
static DimensionValues |
createFrom(String[] values) |
boolean |
equals(Object o) |
String |
get(int index)
Returns the string at the given index, or null if it has no value at this index.
|
String[] |
getValues()
Returns copy of the values in this in an array
|
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isMoreSpecificThan(DimensionValues other)
Helper method which uses compareTo to return whether this is most specific
|
boolean |
matches(DimensionValues givenValues)
Returns true if this is has the same value every place it has a value as the givenValues.
|
int |
size()
Returns the number of values in this (some of which may be null)
|
String |
toString() |
public static final DimensionValues empty
public static DimensionValues createFrom(String[] values)
public boolean matches(DimensionValues givenValues)
public int compareTo(DimensionValues other)
Note: This ordering is not consistent with equals - it returns 0 when the same dimensions are set, regardless of what they are set to.
compareTo
in interface Comparable<DimensionValues>
public boolean isMoreSpecificThan(DimensionValues other)
public boolean isEmpty()
public String get(int index)
public int size()
public String[] getValues()
Copyright © 2018. All rights reserved.