public final class Combination extends TreeMap<String,String> implements Comparable<Combination>
Axis
values.
For example, when axes are "x={1,2},y={3,4}", then
[x=1,y=3] is a combination (out of 4 possible combinations)Modifier and Type | Class and Description |
---|---|
static class |
Combination.BooleanCategory
Duck-typing for boolean expressions.
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
Combination(AxisList axisList,
List<String> values) |
Combination(AxisList axisList,
String... values) |
Combination(Map<String,String> keyValuePairs) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
int |
compareTo(Combination that) |
String |
digest()
Gets the 8 character-wide hash code for this combination
|
boolean |
evalGroovyExpression(AxisList axes,
String expression)
Evaluates the given Groovy expression with values bound from this combination.
|
boolean |
evalGroovyExpression(AxisList axes,
String expression,
groovy.lang.Binding binding)
Deprecated.
as of 1.528
Use
FilterScript.apply(hudson.matrix.MatrixBuild.MatrixBuildExecution, Combination) |
static Combination |
fromString(String id)
Reverse operation of
toString() . |
String |
get(Axis a) |
String |
put(String key,
String value) |
void |
putAll(Map<? extends String,? extends String> map) |
String |
remove(Object key) |
String |
toCompactString(AxisList axes)
Creates compact string representation suitable for display purpose.
|
int |
toIndex(AxisList axis)
Obtains the continuous unique index number of this
Combination
in the given AxisList . |
String |
toString() |
String |
toString(char sep1,
char sep2)
Converts to the ID string representation:
axisName=value,axisName=value,...
|
String |
toString(Collection<Axis> subset)
Works like
toString() but only include the given axes. |
List<String> |
values(Collection<? extends Axis> axes)
Gets the values that correspond to the specified axes, in their order.
|
ceilingEntry, ceilingKey, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
equals, hashCode, isEmpty
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove
public int toIndex(AxisList axis)
Combination
in the given AxisList
.public boolean evalGroovyExpression(AxisList axes, String expression)
For example, if this combination is a=X,b=Y, then expressions like a=="X" would evaluate to true.
public boolean evalGroovyExpression(AxisList axes, String expression, groovy.lang.Binding binding)
FilterScript.apply(hudson.matrix.MatrixBuild.MatrixBuildExecution, Combination)
evalGroovyExpression(AxisList, String)
public int compareTo(Combination that)
compareTo
in interface Comparable<Combination>
public String toString(Collection<Axis> subset)
toString()
but only include the given axes.public List<String> values(Collection<? extends Axis> axes)
public String toString(char sep1, char sep2)
sep1
- The separator between multiple axes.sep2
- The separator between axis name and value.public String toString()
toString
in class AbstractMap<String,String>
public String digest()
public static Combination fromString(String id)
toString()
.public String toCompactString(AxisList axes)
The string is made compact by looking for Axis
whose values
are unique, and omit the axis name.
public void clear()
Copyright © 2016. All rights reserved.