public class Properties extends java.util.HashMap<java.lang.String,Property>
Constructor and Description |
---|
Properties() |
Properties(int initialCapacity) |
Properties(int initialCapacity,
float loadFactor) |
Modifier and Type | Method and Description |
---|---|
<T> boolean |
contains(java.lang.String propertyName,
T valueToCheck)
Check if a property has a specific value.
|
java.lang.Boolean |
getOrDefault(java.lang.String key,
java.lang.Boolean defaultValue)
The method returns the Boolean property value for the specified property name,
otherwise the defaultValue is returned instead.
|
java.lang.Integer |
getOrDefault(java.lang.String key,
java.lang.Integer defaultValue)
The method returns the Integer property value for the specified property name,
otherwise the defaultValue is returned instead.
|
java.util.Set<?> |
getOrDefault(java.lang.String key,
java.util.Set<?> defaultValue)
The method returns the Set property value for the specified property name,
otherwise the defaultValue is returned instead.
|
java.lang.String |
getOrDefault(java.lang.String key,
java.lang.String defaultValue)
The method returns the String property value for the specified property name,
otherwise the defaultValue is returned instead.
|
public Properties()
public Properties(int initialCapacity)
public Properties(int initialCapacity, float loadFactor)
public <T> boolean contains(java.lang.String propertyName, T valueToCheck)
propertyName
- the property to check its valuevalueToCheck
- the value to be checked against property's valuepublic java.lang.String getOrDefault(java.lang.String key, java.lang.String defaultValue)
key
- defaultValue
- public java.lang.Integer getOrDefault(java.lang.String key, java.lang.Integer defaultValue)
key
- defaultValue
- public java.lang.Boolean getOrDefault(java.lang.String key, java.lang.Boolean defaultValue)
key
- defaultValue
- public java.util.Set<?> getOrDefault(java.lang.String key, java.util.Set<?> defaultValue)
key
- defaultValue
- Copyright © 2023 DeviceAtlas Limited. All rights reserved.