public class ChainedProperties extends Object
| Modifier and Type | Field and Description |
|---|---|
ArrayList<Object[]> |
chain
Will be replaced with types alternative
|
static int[] |
fontSizes |
| Constructor and Description |
|---|
ChainedProperties()
Creates a new instance of ChainedProperties
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToChain(String key,
Map<String,String> prop) |
Optional<String> |
findProperty(String key)
Try find property by its name
|
String |
getOrDefault(String key,
String defaultValue)
Get property by its name or return default value when property is not present or is
null |
String |
getProperty(String key) |
boolean |
hasProperty(String key) |
void |
removeChain(String key) |
public ChainedProperties()
public Optional<String> findProperty(String key)
key - property nameOptional containing the value or Optional.empty() if there is no value or
it equals nullpublic String getOrDefault(String key, String defaultValue)
nullkey - property namedefaultValue - default property valuepublic boolean hasProperty(String key)
public void removeChain(String key)
Copyright © 2024. All rights reserved.