public final class Setting
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
Setting()
Prevent indiviual instantiation.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getChoices()
Retrieves the list of available choices by names.
|
java.lang.String |
getDescription()
Get setting description.
|
int |
getNumberOfChoices()
Retrieves number of choices for this Setting.
|
int |
getSelectedChoiceByIndex()
Retrieves the index of the choice currently selected.
|
java.lang.String |
getSelectedChoiceByName()
Retrieves the name of the choice currently selected.
|
java.lang.String |
getTitle()
Get setting title.
|
void |
setChoiceByIndex(int newSelectionIndex)
Sets the choice to be selected by index.
|
void |
setChoiceByName(java.lang.String newSelection)
Sets the choice to be selected by name.
|
public java.lang.String getTitle()
null
if there is no titlepublic java.lang.String getDescription()
null
if there is no
description.public void setChoiceByName(java.lang.String newSelection) throws java.lang.IllegalArgumentException
newSelection
- name of the new selectionjava.lang.IllegalArgumentException
- if the specified choice does not existpublic void setChoiceByIndex(int newSelectionIndex) throws java.lang.ArrayIndexOutOfBoundsException
newSelectionIndex
- index of the new selectionjava.lang.ArrayIndexOutOfBoundsException
- if the specified choice index does
not exist (negativ or greater or equal than number of available choices)public java.lang.String getSelectedChoiceByName()
public int getSelectedChoiceByIndex()
public java.util.List<java.lang.String> getChoices()
public int getNumberOfChoices()
Copyright (c) 2013, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.