public abstract class BasePropertySource extends Object implements org.apache.tamaya.spi.PropertySource
PropertySource that allows to set a default ordinal that will be used, if no
ordinal is provided with the config.| Modifier | Constructor and Description |
|---|---|
protected |
BasePropertySource()
Constructor, using a default ordinal of 0.
|
protected |
BasePropertySource(int defaultOrdinal)
Constructor.
|
protected |
BasePropertySource(String name)
Constructor.
|
protected |
BasePropertySource(String name,
int defaultOrdinal)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.tamaya.spi.PropertyValue |
get(String key) |
int |
getDefaultOrdinal()
Returns the default ordinal used, when no ordinal is set, or the ordinal was not parseable to an int value.
|
String |
getName() |
int |
getOrdinal() |
boolean |
isScannable() |
void |
setDefaultOrdinal(Integer defaultOrdinal)
Allows to set the ordinal of this property source explcitly.
|
void |
setName(String name)
Sets the property source's (unique) name.
|
void |
setOrdinal(Integer ordinal)
Allows to set the ordinal of this property source explcitly.
|
String |
toString() |
protected String |
toStringValues() |
protected BasePropertySource(String name)
name - the (unique) property source name, not null.protected BasePropertySource(int defaultOrdinal)
defaultOrdinal - default ordinal that will be used, if no ordinal is provided with the config.protected BasePropertySource(String name, int defaultOrdinal)
name - the (unique) property source name, not null.defaultOrdinal - default ordinal that will be used, if no ordinal is provided with the config.protected BasePropertySource()
public String getName()
getName in interface org.apache.tamaya.spi.PropertySourcepublic void setName(String name)
name - the name, not null.public void setOrdinal(Integer ordinal)
setOrdinal(null);.ordinal - the explicit ordinal, or null.public void setDefaultOrdinal(Integer defaultOrdinal)
setOrdinal(null);.defaultOrdinal - the default ordinal, or null.public int getOrdinal()
getOrdinal in interface org.apache.tamaya.spi.PropertySourcepublic int getDefaultOrdinal()
public org.apache.tamaya.spi.PropertyValue get(String key)
get in interface org.apache.tamaya.spi.PropertySourcepublic boolean isScannable()
isScannable in interface org.apache.tamaya.spi.PropertySourceprotected String toStringValues()
Copyright © 2016–2017 Apache Software Foundation. All rights reserved.