@Public public abstract class AbstractParameterTool extends ExecutionConfig.GlobalJobParameters implements Serializable, Cloneable
ParameterTool
and MultipleParameterTool
.Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_UNDEFINED |
protected Map<String,String> |
defaultData |
protected static String |
NO_VALUE_KEY |
protected Set<String> |
unrequestedParameters |
Constructor and Description |
---|
AbstractParameterTool() |
Modifier and Type | Method and Description |
---|---|
protected void |
addToDefaults(String key,
String value) |
protected abstract Object |
clone() |
protected abstract String |
get(String key)
Returns the String value for the given key.
|
String |
get(String key,
String defaultValue)
Returns the String value for the given key.
|
boolean |
getBoolean(String key)
Returns the Boolean value for the given key.
|
boolean |
getBoolean(String key,
boolean defaultValue)
Returns the Boolean value for the given key.
|
byte |
getByte(String key)
Returns the Byte value for the given key.
|
byte |
getByte(String key,
byte defaultValue)
Returns the Byte value for the given key.
|
double |
getDouble(String key)
Returns the Double value for the given key.
|
double |
getDouble(String key,
double defaultValue)
Returns the Double value for the given key.
|
float |
getFloat(String key)
Returns the Float value for the given key.
|
float |
getFloat(String key,
float defaultValue)
Returns the Float value for the given key.
|
int |
getInt(String key)
Returns the Integer value for the given key.
|
int |
getInt(String key,
int defaultValue)
Returns the Integer value for the given key.
|
long |
getLong(String key)
Returns the Long value for the given key.
|
long |
getLong(String key,
long defaultValue)
Returns the Long value for the given key.
|
protected abstract int |
getNumberOfParameters()
Returns number of parameters in
AbstractParameterTool . |
String |
getRequired(String key)
Returns the String value for the given key.
|
short |
getShort(String key)
Returns the Short value for the given key.
|
short |
getShort(String key,
short defaultValue)
Returns the Short value for the given key.
|
Set<String> |
getUnrequestedParameters()
Returns the set of parameter names which have not been requested with
has(String) or
one of the get methods. |
abstract boolean |
has(String value)
Check if value is set.
|
abstract Map<String,String> |
toMap()
Convert UserConfig into a
Map<String, String> representation. |
equals, hashCode
protected static final String NO_VALUE_KEY
protected static final String DEFAULT_UNDEFINED
@PublicEvolving public Set<String> getUnrequestedParameters()
has(String)
or
one of the get
methods. Access to the map returned by toMap()
is not
tracked.protected abstract int getNumberOfParameters()
AbstractParameterTool
.protected abstract String get(String key)
public abstract boolean has(String value)
public String getRequired(String key)
RuntimeException
.public String get(String key, String defaultValue)
public int getInt(String key)
public int getInt(String key, int defaultValue)
public long getLong(String key)
public long getLong(String key, long defaultValue)
public float getFloat(String key)
public float getFloat(String key, float defaultValue)
public double getDouble(String key)
public double getDouble(String key, double defaultValue)
public boolean getBoolean(String key)
public boolean getBoolean(String key, boolean defaultValue)
public short getShort(String key)
public short getShort(String key, short defaultValue)
public byte getByte(String key)
public byte getByte(String key, byte defaultValue)
protected abstract Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public abstract Map<String,String> toMap()
ExecutionConfig.GlobalJobParameters
Map<String, String>
representation. This can be used by
the runtime, for example for presenting the user config in the web frontend.toMap
in class ExecutionConfig.GlobalJobParameters
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.