Package org.epics.pvdata.property
Class PVEnumeratedFactory
- java.lang.Object
-
- org.epics.pvdata.property.PVEnumeratedFactory
-
- All Implemented Interfaces:
PVEnumerated
public final class PVEnumeratedFactory extends Object implements PVEnumerated
Implementation of PVEnumerated.- Author:
- mrk
-
-
Constructor Summary
Constructors Constructor Description PVEnumeratedFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanattach(PVField pvField)Attempt to attach to the enumerated field.booleanchoicesMutable()Are the choices mutable.static PVEnumeratedcreate()Create a PVControl.voiddetach()Remove attachment to an enumerated field.StringgetChoice()Get the choice corresponding to the current index.String[]getChoices()Get the current choices.intgetIndex()Get the current index.booleanisAttached()Is this attached to an enumerated structure.booleansetChoices(String[] choices)Set the choices.booleansetIndex(int index)Set the index.
-
-
-
Method Detail
-
create
public static PVEnumerated create()
Create a PVControl.- Returns:
- the newly created PVControl
-
attach
public boolean attach(PVField pvField)
Description copied from interface:PVEnumeratedAttempt to attach to the enumerated field. The field must either be an enumerated field itself or a subfield of the parent of a field named value.- Specified by:
attachin interfacePVEnumerated- Parameters:
pvField- The field for which to find an enumerated field,- Returns:
- (false,true) if enumerated field (not found, found).
-
detach
public void detach()
Description copied from interface:PVEnumeratedRemove attachment to an enumerated field.- Specified by:
detachin interfacePVEnumerated
-
isAttached
public boolean isAttached()
Description copied from interface:PVEnumeratedIs this attached to an enumerated structure.- Specified by:
isAttachedin interfacePVEnumerated- Returns:
- false or true.
-
choicesMutable
public boolean choicesMutable()
Description copied from interface:PVEnumeratedAre the choices mutable.- Specified by:
choicesMutablein interfacePVEnumerated- Returns:
- false or true
-
getChoice
public String getChoice()
Description copied from interface:PVEnumeratedGet the choice corresponding to the current index.- Specified by:
getChoicein interfacePVEnumerated- Returns:
- the value
-
getChoices
public String[] getChoices()
Description copied from interface:PVEnumeratedGet the current choices.- Specified by:
getChoicesin interfacePVEnumerated- Returns:
- the choices
-
getIndex
public int getIndex()
Description copied from interface:PVEnumeratedGet the current index.- Specified by:
getIndexin interfacePVEnumerated- Returns:
- the value
-
setChoices
public boolean setChoices(String[] choices)
Description copied from interface:PVEnumeratedSet the choices.- Specified by:
setChoicesin interfacePVEnumerated- Parameters:
choices- the choices- Returns:
- (false,true) in choices are (immutable, mutable)
-
setIndex
public boolean setIndex(int index)
Description copied from interface:PVEnumeratedSet the index.- Specified by:
setIndexin interfacePVEnumerated- Parameters:
index- the value- Returns:
- (false,true) if the index (was not, was) modified.
-
-