|
|||||||||
| Home >> All >> com >> maddyhome >> idea >> vim >> [ option overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.maddyhome.idea.vim.option
Class NumberOption

java.lang.Objectcom.maddyhome.idea.vim.option.Option
com.maddyhome.idea.vim.option.TextOption
com.maddyhome.idea.vim.option.NumberOption
- public class NumberOption
- extends TextOption
Represents an option with a numeric value
| Nested Class Summary |
| Nested classes inherited from class com.maddyhome.idea.vim.option.Option |
Option.NameSorter |
| Field Summary | |
private int |
dflt
|
private int |
max
|
private int |
min
|
private int |
value
|
| Fields inherited from class com.maddyhome.idea.vim.option.Option |
abbrev, listeners, name |
| Constructor Summary | |
(package private) |
NumberOption(java.lang.String name,
java.lang.String abbrev,
int dflt)
Creates a number option that must contain a zero or positive value |
(package private) |
NumberOption(java.lang.String name,
java.lang.String abbrev,
int dflt,
int min,
int max)
Creates a number option |
| Method Summary | |
boolean |
append(java.lang.String val)
Adds the value to the option's value after parsing the string into a number. |
protected java.lang.Integer |
asNumber(java.lang.String val)
|
java.lang.String |
getValue()
Gets the option's value as a string |
protected boolean |
inRange(int val)
|
boolean |
isDefault()
Checks to see if the option's current value equals the default value |
boolean |
prepend(java.lang.String val)
Multiplies the value by the option's value after parsing the string into a number. |
boolean |
remove(java.lang.String val)
Substracts the value from the option's value after parsing the string into a number. |
void |
resetDefault()
Sets the option to its default value. |
boolean |
set(int val)
Sets the option's value if the value is in the proper range |
boolean |
set(java.lang.String val)
Sets the option's value after parsing the string into a number. |
java.lang.String |
toString()
{name}={value} |
int |
value()
Gets the option's value as an int |
| Methods inherited from class com.maddyhome.idea.vim.option.Option |
addOptionChangeListener, fireOptionChangeEvent, getAbbreviation, getName, removeOptionChangeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
dflt
private int dflt
value
private int value
min
private int min
max
private int max
| Constructor Detail |
NumberOption
NumberOption(java.lang.String name, java.lang.String abbrev, int dflt)
- Creates a number option that must contain a zero or positive value
NumberOption
NumberOption(java.lang.String name, java.lang.String abbrev, int dflt, int min, int max)
- Creates a number option
| Method Detail |
getValue
public java.lang.String getValue()
- Gets the option's value as a string
- Specified by:
getValuein classTextOption
value
public int value()
- Gets the option's value as an int
set
public boolean set(int val)
- Sets the option's value if the value is in the proper range
set
public boolean set(java.lang.String val)
- Sets the option's value after parsing the string into a number. The supplied value can be in decimal,
hex, or octal formats. Octal numbers must be preceded with a zero and all digits must be 0 - 7. Hex values
must start with 0x or 0X and all digits must be 0 - 9, a - F, or A - F. All others will be tried as a decimal
number.
- Specified by:
setin classTextOption
append
public boolean append(java.lang.String val)
- Adds the value to the option's value after parsing the string into a number. The supplied value can be in decimal,
hex, or octal formats. Octal numbers must be preceded with a zero and all digits must be 0 - 7. Hex values
must start with 0x or 0X and all digits must be 0 - 9, a - F, or A - F. All others will be tried as a decimal
number.
- Specified by:
appendin classTextOption
prepend
public boolean prepend(java.lang.String val)
- Multiplies the value by the option's value after parsing the string into a number. The supplied value can be in
decimal, hex, or octal formats. Octal numbers must be preceded with a zero and all digits must be 0 - 7. Hex
values must start with 0x or 0X and all digits must be 0 - 9, a - F, or A - F. All others will be tried as a
decimal number.
- Specified by:
prependin classTextOption
remove
public boolean remove(java.lang.String val)
- Substracts the value from the option's value after parsing the string into a number. The supplied value can be in
decimal, hex, or octal formats. Octal numbers must be preceded with a zero and all digits must be 0 - 7. Hex
values must start with 0x or 0X and all digits must be 0 - 9, a - F, or A - F. All others will be tried as a
decimal number.
- Specified by:
removein classTextOption
isDefault
public boolean isDefault()
- Checks to see if the option's current value equals the default value
resetDefault
public void resetDefault()
- Sets the option to its default value.
- Specified by:
resetDefaultin classOption
asNumber
protected java.lang.Integer asNumber(java.lang.String val)
inRange
protected boolean inRange(int val)
toString
public java.lang.String toString()
- {name}={value}
|
|||||||||
| Home >> All >> com >> maddyhome >> idea >> vim >> [ option overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC