public class PropertyUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.String> |
applySchemaChanges(java.util.Map<java.lang.String,java.lang.String> properties,
java.util.List<java.lang.String> deletedColumns,
java.util.Map<java.lang.String,java.lang.String> renamedColumns,
java.util.Set<java.lang.String> columnProperties) |
static java.util.Map<java.lang.String,java.lang.String> |
filterProperties(java.util.Map<java.lang.String,java.lang.String> properties,
java.util.function.Predicate<java.lang.String> keyPredicate)
Filter the properties map by the provided key predicate.
|
static java.util.Map<java.lang.String,java.lang.String> |
propertiesWithPrefix(java.util.Map<java.lang.String,java.lang.String> properties,
java.lang.String prefix)
Returns subset of provided map with keys matching the provided prefix.
|
static boolean |
propertyAsBoolean(java.util.Map<java.lang.String,java.lang.String> properties,
java.lang.String property,
boolean defaultValue) |
static double |
propertyAsDouble(java.util.Map<java.lang.String,java.lang.String> properties,
java.lang.String property,
double defaultValue) |
static int |
propertyAsInt(java.util.Map<java.lang.String,java.lang.String> properties,
java.lang.String property,
int defaultValue) |
static long |
propertyAsLong(java.util.Map<java.lang.String,java.lang.String> properties,
java.lang.String property,
long defaultValue) |
static java.lang.Boolean |
propertyAsNullableBoolean(java.util.Map<java.lang.String,java.lang.String> properties,
java.lang.String property) |
static java.lang.Integer |
propertyAsNullableInt(java.util.Map<java.lang.String,java.lang.String> properties,
java.lang.String property) |
static java.lang.Long |
propertyAsNullableLong(java.util.Map<java.lang.String,java.lang.String> properties,
java.lang.String property) |
static java.lang.String |
propertyAsString(java.util.Map<java.lang.String,java.lang.String> properties,
java.lang.String property,
java.lang.String defaultValue) |
public static boolean propertyAsBoolean(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String property, boolean defaultValue)
public static java.lang.Boolean propertyAsNullableBoolean(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String property)
public static double propertyAsDouble(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String property, double defaultValue)
public static int propertyAsInt(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String property, int defaultValue)
public static java.lang.Integer propertyAsNullableInt(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String property)
public static long propertyAsLong(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String property, long defaultValue)
public static java.lang.Long propertyAsNullableLong(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String property)
public static java.lang.String propertyAsString(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String property, java.lang.String defaultValue)
public static java.util.Map<java.lang.String,java.lang.String> propertiesWithPrefix(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String prefix)
properties
- input mapprefix
- prefix to choose keys from input mappublic static java.util.Map<java.lang.String,java.lang.String> filterProperties(java.util.Map<java.lang.String,java.lang.String> properties, java.util.function.Predicate<java.lang.String> keyPredicate)
properties
- input mapkeyPredicate
- predicate to choose keys from input mappublic static java.util.Map<java.lang.String,java.lang.String> applySchemaChanges(java.util.Map<java.lang.String,java.lang.String> properties, java.util.List<java.lang.String> deletedColumns, java.util.Map<java.lang.String,java.lang.String> renamedColumns, java.util.Set<java.lang.String> columnProperties)