public class SingleValueParameter extends Parameter
SingleValueParameter
class represents a parameter as part of a modular input instance that
contains only a single value. This corresponds to XML fragments of the form:
<param name="param1">value11</param>
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
boolean |
getBoolean()
Tries to coerce the value of this parameter to a Boolean.
|
double |
getDouble()
Coerces the value of this field to a double.
|
float |
getFloat()
Coerces the value of this field to a float.
|
int |
getInt()
Coerces the value of this field to an int.
|
long |
getLong()
Coerces the value of this field to a long.
|
String |
getName() |
String |
getValue()
Returns the parameter as found (as a String), without trying to coerce it to another type.
|
int |
hashCode() |
nodeToParameterList
public String getName()
public String getValue()
getBoolean
or one of getInt
, getLong
,
getFloat
, and getDouble
instead.public boolean getBoolean() throws MalformedDataException
true
, and a similar range (false, f, off, 0, no, n) as false
. Everything
else, including null, results in a MalformedDataException
.MalformedDataException
- If the value cannot be coerced to a boolean.public int getInt()
public long getLong()
public float getFloat()
public double getDouble()
Copyright © 2022 Splunk, Inc.. All rights reserved.