public final class CoContraDimensionPairs
extends java.lang.Object
CoContraDimensionPair
s and collections of them.Modifier and Type | Method and Description |
---|---|
static java.util.Set<java.lang.Class<?>> |
allDimensionsIn(java.lang.Iterable<CoContraDimensionPair> pairs)
Collects all the dimensions that are contained in at least one of the given pairs, as either left or right
dimension.
|
static java.util.List<CoContraDimensionPair> |
chooseOnePerContravariantPart(java.util.List<CoContraDimensionPair> allPairs)
Filters the list of pairs in such a way, that only one per contravariant type remains.
|
static java.util.List<CoContraDimensionPair> |
coContraPairsOf(Shape left,
Shape right)
Searches in the two given shapes for dimensions that form pairs of co- and contravariant dimensions.
|
static Position |
convertToRight(Position position,
java.util.List<CoContraDimensionPair> dimensionPairs) |
static java.util.Set<java.lang.Class<?>> |
leftDimensionsIn(java.lang.Iterable<CoContraDimensionPair> pairs) |
static java.util.Map<java.lang.Class<?>,java.util.Collection<CoContraDimensionPair>> |
mapOutByContravariantPart(java.util.List<CoContraDimensionPair> allPairs) |
static java.util.Set<java.lang.Class<?>> |
rightDimensionsIn(java.lang.Iterable<CoContraDimensionPair> pairs) |
public static java.util.Set<java.lang.Class<?>> rightDimensionsIn(java.lang.Iterable<CoContraDimensionPair> pairs)
public static java.util.Set<java.lang.Class<?>> leftDimensionsIn(java.lang.Iterable<CoContraDimensionPair> pairs)
public static java.util.Set<java.lang.Class<?>> allDimensionsIn(java.lang.Iterable<CoContraDimensionPair> pairs)
pairs
- the pairs from which to retrieve the dimensionspublic static java.util.Map<java.lang.Class<?>,java.util.Collection<CoContraDimensionPair>> mapOutByContravariantPart(java.util.List<CoContraDimensionPair> allPairs)
public static java.util.List<CoContraDimensionPair> coContraPairsOf(Shape left, Shape right)
left
- the left shape of an operation that involves co- contravariant coordinatesright
- the right shape of an operation that involves co- and contravariant coordinatespublic static java.util.List<CoContraDimensionPair> chooseOnePerContravariantPart(java.util.List<CoContraDimensionPair> allPairs)
allPairs
- the pairs to filterpublic static Position convertToRight(Position position, java.util.List<CoContraDimensionPair> dimensionPairs)