@Beta public class ApexCartesianProductHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static Object |
GROUP_NOT_EXPRESSED
Used to flag the intersection failed
|
protected static org.slf4j.Logger |
LOGGER |
| Modifier | Constructor and Description |
|---|---|
protected |
ApexCartesianProductHelper() |
| Modifier and Type | Method and Description |
|---|---|
static long |
cartesianProductSize(List<? extends Set<?>> listOfSets) |
static <T> long |
computeCartesianSize(com.google.common.collect.SetMultimap<T,?> keyToEncountered) |
protected static <T,V> Collection<? extends Map<T,? extends Set<V>>> |
computeCoveringMaps(Set<T> keySet,
com.google.common.collect.SetMultimap<T,V> keyToEncountered,
Set<Map<T,V>> flatMaps) |
protected static <T,V> List<T> |
computeKeysOrder(com.google.common.collect.SetMultimap<T,V> keyToEncountered) |
protected static <T,V> void |
flattenInput(Iterable<? extends Map<? extends T,? extends V>> input,
Map<Set<T>,com.google.common.collect.SetMultimap<T,V>> keysToKeyToEncountered,
Map<Set<T>,Set<Map<T,V>>> keysToFlatMap) |
static <T,V> Set<? extends Map<T,? extends Set<V>>> |
groupByKeyAndInValues(Iterable<? extends Map<? extends T,? extends V>> input) |
static <T,V> Set<? extends Map<T,? extends Set<V>>> |
groupByKeyAndInValues(Iterable<? extends Map<? extends T,? extends V>> input,
Consumer<Object> checkRegularly) |
static <T> boolean |
intersectCoordinates(Map<T,Object> columnNameToConstraint,
T columnName,
Object rangeCoordinate) |
static Object |
intersectCoordinates(Object baseCoordinate,
Object additionalCoordinate) |
static <T> boolean |
intersectMapCoordinates(Map<T,Object> target,
Map<? extends T,?> source) |
static <T> Set<? extends Map<T,?>> |
mergeCartesianProducts(Iterable<? extends Set<? extends Map<? extends T,?>>> templates) |
static <T> Set<? extends Map<T,?>> |
mergeCartesianProducts(Iterable<? extends Set<? extends Map<? extends T,?>>> templates,
Consumer<Object> checkRegularly) |
static <T> com.google.common.base.Optional<Map<T,Object>> |
mergeTemplate(Map<? extends T,?> currentTemplate,
Map<? extends T,?> additionalTemplate) |
protected static <T,V> Set<Set<T>> |
removeRedundantConditions(Map<Set<T>,com.google.common.collect.SetMultimap<T,V>> keysToKeyToEncountered,
Map<Set<T>,Set<Map<T,V>>> keysToFlatMap) |
protected static final org.slf4j.Logger LOGGER
public static final Object GROUP_NOT_EXPRESSED
@Beta public static <T,V> Set<? extends Map<T,? extends Set<V>>> groupByKeyAndInValues(Iterable<? extends Map<? extends T,? extends V>> input)
public static <T,V> Set<? extends Map<T,? extends Set<V>>> groupByKeyAndInValues(Iterable<? extends Map<? extends T,? extends V>> input, Consumer<Object> checkRegularly)
protected static <T,V> Set<Set<T>> removeRedundantConditions(Map<Set<T>,com.google.common.collect.SetMultimap<T,V>> keysToKeyToEncountered, Map<Set<T>,Set<Map<T,V>>> keysToFlatMap)
protected static <T,V> void flattenInput(Iterable<? extends Map<? extends T,? extends V>> input, Map<Set<T>,com.google.common.collect.SetMultimap<T,V>> keysToKeyToEncountered, Map<Set<T>,Set<Map<T,V>>> keysToFlatMap)
protected static <T,V> Collection<? extends Map<T,? extends Set<V>>> computeCoveringMaps(Set<T> keySet, com.google.common.collect.SetMultimap<T,V> keyToEncountered, Set<Map<T,V>> flatMaps)
protected static <T,V> List<T> computeKeysOrder(com.google.common.collect.SetMultimap<T,V> keyToEncountered)
public static <T> long computeCartesianSize(com.google.common.collect.SetMultimap<T,?> keyToEncountered)
public static <T> Set<? extends Map<T,?>> mergeCartesianProducts(Iterable<? extends Set<? extends Map<? extends T,?>>> templates)
templates - the List of templates which has to be multiplied together (e.g. the first set would express (FR, USA)
and the second Set (Today, Yesterday). We want all combinations, leading at the end to
(FR,USA)*(Today, Yesterday))public static <T> Set<? extends Map<T,?>> mergeCartesianProducts(Iterable<? extends Set<? extends Map<? extends T,?>>> templates, Consumer<Object> checkRegularly)
public static <T> com.google.common.base.Optional<Map<T,Object>> mergeTemplate(Map<? extends T,?> currentTemplate, Map<? extends T,?> additionalTemplate)
public static <T> boolean intersectCoordinates(Map<T,Object> columnNameToConstraint, T columnName, Object rangeCoordinate)
public static <T> boolean intersectMapCoordinates(Map<T,Object> target, Map<? extends T,?> source)
public static Object intersectCoordinates(Object baseCoordinate, Object additionalCoordinate)
Copyright © 2014–2017 Pivotal Software, Inc.. All rights reserved.