Interface Connector.IntegerArgument
- All Superinterfaces:
Connector.Argument, Serializable
- Enclosing interface:
Connector
public static interface Connector.IntegerArgument extends Connector.Argument
Specification for and value of a Connector argument, whose value is an integer. Integer values are represented by their corresponding strings.
- Since:
- 1.3
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
int |
intValue() |
Return the value of the argument as a int. |
boolean |
isValid |
Performs basic sanity check of argument. |
boolean |
isValid |
Performs basic sanity check of argument. |
int |
max() |
The upper bound for the value. |
int |
min() |
The lower bound for the value. |
void |
setValue |
Sets the value of the argument. |
String |
stringValueOf |
Return the string representation of the value parameter. |
Methods declared in interface Connector.Argument
description, label, mustSpecify, name, setValue, value | Modifier and Type | Method | Description |
|---|---|---|
String |
description() |
Returns a human-readable description of this argument and its purpose. |
String |
label() |
Returns a short human-readable label for this argument. |
boolean |
mustSpecify() |
Indicates whether the argument must be specified. |
String |
name() |
Returns a short, unique identifier for the argument. |
void |
setValue |
Sets the value of the argument. |
String |
value() |
Returns the current value of the argument. |
Method Details
setValue
void setValue(int value)
Sets the value of the argument. The value should be checked with
isValid(int) before setting it; invalid values will throw an exception when the connection is established - for example, on LaunchingConnector.launch(Map)
isValid
boolean isValid(String value)
Performs basic sanity check of argument.
- Specified by:
-
isValidin interfaceConnector.Argument - Returns:
-
trueif value represents an int that ismin()<= value <=max()
isValid
stringValueOf
String stringValueOf(int value)
Return the string representation of the
value parameter. Does not set or examine the current value of this instance.- Returns:
- the String representation of the int value.
intValue
int intValue()
Return the value of the argument as a int. Since the argument may not have been set or may have an invalid value
isValid(String) should be called on Connector.Argument.value() to check its validity. If it is invalid the int returned by this method is undefined.- Returns:
- the value of the argument as a int.
max
int max()
The upper bound for the value.
- Returns:
- the maximum allowed value for this argument.
min
int min()
The lower bound for the value.
- Returns:
- the minimum allowed value for this argument.
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.