public final class LocalProperties extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Set<T> |
extractLeadingConstants(List<? extends LocalProperty<T>> properties) |
static <T> List<LocalProperty<T>> |
grouped(Collection<T> columns) |
static <T> List<Optional<LocalProperty<T>>> |
match(List<LocalProperty<T>> actuals,
List<LocalProperty<T>> desired)
Attempt to match the desired properties to a sequence of known properties.
|
static <T> List<LocalProperty<T>> |
none() |
static <T> List<Optional<LocalProperty<T>>> |
normalize(List<? extends LocalProperty<T>> localProperties)
Normalizes the local properties by removing redundant symbols, but retains the original local property positions
|
static <T> List<LocalProperty<T>> |
normalizeAndPrune(List<? extends LocalProperty<T>> localProperties)
Normalizes the local properties and potentially consolidates it to the smallest possible list
NOTE: When normalized, each symbol will only appear once
|
static <T> List<LocalProperty<T>> |
sorted(Collection<T> columns,
SortOrder order) |
static <T> List<LocalProperty<T>> |
stripLeadingConstants(List<? extends LocalProperty<T>> properties) |
static <X,Y> List<LocalProperty<Y>> |
translate(List<? extends LocalProperty<X>> properties,
Function<X,Optional<Y>> translator)
Translates the properties as much as possible, and truncates at the first non-translatable property
|
public static <T> List<LocalProperty<T>> none()
public static <T> List<LocalProperty<T>> grouped(Collection<T> columns)
public static <T> List<LocalProperty<T>> sorted(Collection<T> columns, SortOrder order)
public static <T> List<LocalProperty<T>> stripLeadingConstants(List<? extends LocalProperty<T>> properties)
public static <T> Set<T> extractLeadingConstants(List<? extends LocalProperty<T>> properties)
public static <X,Y> List<LocalProperty<Y>> translate(List<? extends LocalProperty<X>> properties, Function<X,Optional<Y>> translator)
public static <T> List<Optional<LocalProperty<T>>> match(List<LocalProperty<T>> actuals, List<LocalProperty<T>> desired)
Returns a list of the same length as the original. Entries are: - Optional.empty(): the property was satisfied completely - non-empty: the (simplified) property that was not satisfied
public static <T> List<LocalProperty<T>> normalizeAndPrune(List<? extends LocalProperty<T>> localProperties)
public static <T> List<Optional<LocalProperty<T>>> normalize(List<? extends LocalProperty<T>> localProperties)
Copyright © 2012–2022. All rights reserved.