public abstract class FileSystemConfigBuilder extends Object
Modifier | Constructor and Description |
---|---|
protected |
FileSystemConfigBuilder()
Construct builder with default prefix.
|
protected |
FileSystemConfigBuilder(String component)
Construct builder with specified component name.
|
Modifier and Type | Method and Description |
---|---|
protected Boolean |
getBoolean(FileSystemOptions opts,
String name)
Get named option as boolean.
|
protected boolean |
getBoolean(FileSystemOptions opts,
String name,
boolean defaultValue)
Get named option as boolean.
|
protected Boolean |
getBoolean(FileSystemOptions opts,
String name,
Boolean defaultValue)
Get named option as boolean.
|
protected Byte |
getByte(FileSystemOptions opts,
String name)
Get named option as byte.
|
protected byte |
getByte(FileSystemOptions opts,
String name,
byte defaultValue)
Get named option as byte.
|
protected Byte |
getByte(FileSystemOptions opts,
String name,
Byte defaultValue)
Get named option as byte.
|
protected Character |
getCharacter(FileSystemOptions opts,
String name)
Get named option as character.
|
protected char |
getCharacter(FileSystemOptions opts,
String name,
char defaultValue)
Get named option as character.
|
protected Character |
getCharacter(FileSystemOptions opts,
String name,
Character defaultValue)
Get named option as character.
|
protected abstract Class<? extends FileSystem> |
getConfigClass()
Get the target of this configuration.
|
protected Double |
getDouble(FileSystemOptions opts,
String name)
Get named option as double.
|
protected double |
getDouble(FileSystemOptions opts,
String name,
double defaultValue)
Get named option as double.
|
protected Double |
getDouble(FileSystemOptions opts,
String name,
Double defaultValue)
Get named option as double.
|
protected <E extends Enum<E>> |
getEnum(Class<E> enumClass,
FileSystemOptions opts,
String name)
Get named option as enumeration.
|
protected <E extends Enum<E>> |
getEnum(Class<E> enumClass,
FileSystemOptions opts,
String name,
E defaultValue)
Get named option as enumeration.
|
protected Float |
getFloat(FileSystemOptions opts,
String name)
Get named option as float.
|
protected float |
getFloat(FileSystemOptions opts,
String name,
float defaultValue)
Get named option as float.
|
protected Float |
getFloat(FileSystemOptions opts,
String name,
Float defaultValue)
Get named option as float.
|
protected Integer |
getInteger(FileSystemOptions opts,
String name)
Get named option as integer.
|
protected int |
getInteger(FileSystemOptions opts,
String name,
int defaultValue)
Get named option as integer.
|
protected Integer |
getInteger(FileSystemOptions opts,
String name,
Integer defaultValue)
Get named option as integer.
|
protected Long |
getLong(FileSystemOptions opts,
String name)
Get named option as long.
|
protected long |
getLong(FileSystemOptions opts,
String name,
long defaultValue)
Get named option as long.
|
protected Long |
getLong(FileSystemOptions opts,
String name,
Long defaultValue)
Get named option as long.
|
protected Object |
getParam(FileSystemOptions opts,
String name)
Get named parameter.
|
String |
getRootURI(FileSystemOptions opts)
Return the root URI of the file system.
|
protected Short |
getShort(FileSystemOptions opts,
String name)
Get named option as short.
|
protected short |
getShort(FileSystemOptions opts,
String name,
short defaultValue)
Get named option as short.
|
protected Short |
getShort(FileSystemOptions opts,
String name,
Short defaultValue)
Get named option as short.
|
protected String |
getString(FileSystemOptions opts,
String name)
Get named option as String.
|
protected String |
getString(FileSystemOptions opts,
String name,
String defaultValue)
Get named option as String.
|
protected boolean |
hasObject(FileSystemOptions opts,
String name)
Is named setting specified.
|
protected boolean |
hasParam(FileSystemOptions opts,
String name)
Check if option exists.
|
protected void |
setParam(FileSystemOptions opts,
String name,
boolean value)
Set named parameter.
|
protected void |
setParam(FileSystemOptions opts,
String name,
Object value)
Set named parameter.
|
void |
setRootURI(FileSystemOptions opts,
String rootURI)
The root URI of the file system.
|
protected FileSystemConfigBuilder()
protected FileSystemConfigBuilder(String component)
component
- component name to be used in prefixpublic void setRootURI(FileSystemOptions opts, String rootURI)
opts
- the file system options to modifyrootURI
- The creator name to be associated with the file.public String getRootURI(FileSystemOptions opts)
opts
- file system options to work withprotected void setParam(FileSystemOptions opts, String name, boolean value)
opts
- the file system options to modifyname
- set option with this namevalue
- boolean value to setprotected void setParam(FileSystemOptions opts, String name, Object value)
opts
- the file system options to modifyname
- set option with this namevalue
- object value to setprotected Object getParam(FileSystemOptions opts, String name)
opts
- file system options to work withname
- get option with this nameprotected boolean hasParam(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the name to look up in opts
protected boolean hasObject(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option to check in opts
or system propertiesprotected Boolean getBoolean(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option nameopts
or system properties, otherwise nullgetBoolean(FileSystemOptions, String, Boolean)
protected boolean getBoolean(FileSystemOptions opts, String name, boolean defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
getBoolean(FileSystemOptions, String, Boolean)
protected Boolean getBoolean(FileSystemOptions opts, String name, Boolean defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
getBoolean(FileSystemOptions, String, Boolean)
protected Byte getByte(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option nameopts
or system properties, otherwise nullgetByte(FileSystemOptions, String, Byte)
protected byte getByte(FileSystemOptions opts, String name, byte defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
getByte(FileSystemOptions, String, Byte)
protected Byte getByte(FileSystemOptions opts, String name, Byte defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
protected Character getCharacter(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option nameopts
or system properties, otherwise nullgetCharacter(FileSystemOptions, String, Character)
protected char getCharacter(FileSystemOptions opts, String name, char defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
getCharacter(FileSystemOptions, String, Character)
protected Character getCharacter(FileSystemOptions opts, String name, Character defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
protected Double getDouble(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option nameopts
or system properties, otherwise nullgetDouble(FileSystemOptions, String, Double)
protected double getDouble(FileSystemOptions opts, String name, double defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
getDouble(FileSystemOptions, String, Double)
protected Double getDouble(FileSystemOptions opts, String name, Double defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
protected <E extends Enum<E>> E getEnum(Class<E> enumClass, FileSystemOptions opts, String name)
E
- enumeration typeenumClass
- class of enumeration typeopts
- file system options to work withname
- the option name *opts
or system properties, otherwise nullIllegalArgumentException
- if option value is not a known enumeration.getEnum(Class, FileSystemOptions, String, Enum)
protected <E extends Enum<E>> E getEnum(Class<E> enumClass, FileSystemOptions opts, String name, E defaultValue)
E
- enumeration typeenumClass
- class of enumeration typeopts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
IllegalArgumentException
- if option value is not a known enumeration.getEnum(Class, FileSystemOptions, String, Enum)
protected Float getFloat(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option nameopts
or system properties, otherwise nullNumberFormatException
- if option value is not a valid float.getFloat(FileSystemOptions, String, Float)
protected float getFloat(FileSystemOptions opts, String name, float defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
NumberFormatException
- if option value is not a valid float.getFloat(FileSystemOptions, String, Float)
protected Float getFloat(FileSystemOptions opts, String name, Float defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
NumberFormatException
- if option value is not a valid float.protected Integer getInteger(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option nameopts
or system properties, otherwise nullNumberFormatException
- if option value is not a valid integer.getInteger(FileSystemOptions, String, Integer)
protected int getInteger(FileSystemOptions opts, String name, int defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
NumberFormatException
- if option value is not a valid integer.getInteger(FileSystemOptions, String, Integer)
protected Integer getInteger(FileSystemOptions opts, String name, Integer defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
NumberFormatException
- if option value is not a valid integer.protected Long getLong(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option nameopts
or system properties, otherwise nullNumberFormatException
- if option value is not a valid long.getLong(FileSystemOptions, String, Long)
protected long getLong(FileSystemOptions opts, String name, long defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
NumberFormatException
- if option value is not a valid long.getLong(FileSystemOptions, String, Long)
protected Long getLong(FileSystemOptions opts, String name, Long defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
NumberFormatException
- if option value is not a valid long.protected Short getShort(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option nameopts
or system properties, otherwise nullNumberFormatException
- if option value is not a valid short.getShort(FileSystemOptions, String, Short)
protected short getShort(FileSystemOptions opts, String name, short defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
NumberFormatException
- if option value is not a valid shortgetShort(FileSystemOptions, String, Short)
protected Short getShort(FileSystemOptions opts, String name, Short defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
NumberFormatException
- if option value is not a valid shortprotected String getString(FileSystemOptions opts, String name)
opts
- file system options to work withname
- the option nameopts
or system properties, otherwise nullgetString(FileSystemOptions, String, String)
protected String getString(FileSystemOptions opts, String name, String defaultValue)
opts
- file system options to work withname
- the option namedefaultValue
- value to return if option is not presentopts
or system properties, otherwise defaultValue
protected abstract Class<? extends FileSystem> getConfigClass()
Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.