|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object
|
+--com.sas.Component
|
+--com.sas.util.selectors.BaseSelector
|
+--com.sas.util.selectors.IntegerIndexedSelector
|
+--com.sas.util.selectors.ArraySelector
A selector for array collections and integer valued keys.
An ArraySelector selects the indexed value array[integerKey]
from an array array.
The key must be an integer. The selected item is array[integerKey()].
If the array type is a primitive type, the value property is a
java.lang wrapper, such as Integer
| Field Summary | |
static String |
RB_KEY
|
| Fields inherited from class com.sas.util.selectors.BaseSelector |
lastKey, lastValue |
| Constructor Summary | |
ArraySelector()
default constructor |
|
ArraySelector(Object array,
Object key)
Construct an ArraySelector for an array and integer key. |
|
| Method Summary | |
static int |
computeIntegerKey(Object key)
Convert a key/value into an integer. |
static ExtendedBeanInfo |
getExtendedBeanInfo()
|
Object |
getKey(Object value)
Return the key that corresponds to a value |
protected Object |
getValue(int index)
Get the value form the array collection, based on an integer index |
Object |
getValue(Object key)
Return the value that corresponds to a key |
protected int |
keyAsInteger(Object object)
Return the integer key for a value |
| Methods inherited from class com.sas.util.selectors.BaseSelector |
contentsChanged, firePropertyChange, forgetKey, forgetValue, getCollection, getKey, getValue, isFound, listen, maybeFireKey, maybeFireValue, propertyChange, setCollection, setFound, setKey, setValue, unlisten, update |
| Methods inherited from class com.sas.Component |
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, beansIsDesignTime, beansSetDesignTime, clone, clone, detachModel, detachView, dumpComponent, firePropertyChange, fireVetoableChange, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getLinkInfo, getModelInterface, getRequiredInterfaces, getResources, getStringResource, getViewInterfaceSupportInfo, initialize, initializeComponent, isDesignTime, isLinked, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setComponentDescription, setComponentSupportInfo, setDefaultValues, setLinkInfo, setModelInterface, setRequiredInterfaces, setViewInterfaceSupportInfo, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, validateObject |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String RB_KEY
| Constructor Detail |
public ArraySelector()
public ArraySelector(Object array,
Object key)
array - The array from which elements are selectedkey - The key, which should be an Integer or some value from which
an integer can be selected| Method Detail |
public static ExtendedBeanInfo getExtendedBeanInfo()
protected Object getValue(int index)
getValue in class com.sas.util.selectors.IntegerIndexedSelectorindex - the index into the arrayDoubleprotected int keyAsInteger(Object object)
keyAsInteger in class com.sas.util.selectors.IntegerIndexedSelectorobject - a value which resides in the array.NoSuchElementException - if the object is not found in the arraypublic Object getKey(Object value)
getKey in class BaseSelectorcom.sas.util.selectors.BaseSelectorpublic Object getValue(Object key)
getValue in class BaseSelectorcom.sas.util.selectors.BaseSelectorkey - a keygetCollection().get(getKey())public static int computeIntegerKey(Object key)
key - some valueIllegalArgumentException - if the key cannot be
interpreted as an integer.
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||