org.scopemvc.core
Class StringIndexSelector

java.lang.Object
  |
  +--org.scopemvc.core.Selector
        |
        +--org.scopemvc.core.StringIndexSelector

public final class StringIndexSelector
extends Selector

An implementation of Selector that identifies a property by its String index within the parent model object.

Create by Selector.fromString(String).

Version:
$Revision: 1.4 $ $Date: 2002/09/05 15:41:45 $
Author:
Steve Meyfroidt

Field Summary
 
Fields inherited from class org.scopemvc.core.Selector
DELIMITER
 
Method Summary
 java.lang.String getIndex()
          Gets the index (i.e the name of the property selected)
 java.lang.String getName()
          Gets the name of the property selected
protected  Selector getShallowCopy()
          Creates a shallow copy of this selector
 int hashCode()
          Returns the hashCode
 void setIndex(java.lang.String inIndex)
          Sets the index
protected  boolean shallowEquals(Selector inSelector)
          Returns true if this Selector is equals to the given Selector when omitting the chained Selectors
 
Methods inherited from class org.scopemvc.core.Selector
asString, chain, deepClone, equals, fromInt, fromString, getLast, getNext, removeLast, removeLast, setNext, startsWith, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getIndex

public final java.lang.String getIndex()
Gets the index (i.e the name of the property selected)

Returns:
The index value
See Also:
getName()

getName

public final java.lang.String getName()
Gets the name of the property selected

Specified by:
getName in class Selector
Returns:
The name value

setIndex

public void setIndex(java.lang.String inIndex)
Sets the index

Parameters:
inIndex - The new index value

hashCode

public int hashCode()
Returns the hashCode

Overrides:
hashCode in class java.lang.Object
Returns:
the hashCode of this object

getShallowCopy

protected Selector getShallowCopy()
Creates a shallow copy of this selector

Specified by:
getShallowCopy in class Selector
Returns:
a shallow copy of this selector

shallowEquals

protected final boolean shallowEquals(Selector inSelector)
Returns true if this Selector is equals to the given Selector when omitting the chained Selectors

Specified by:
shallowEquals in class Selector
Parameters:
inSelector - Another Selector to test against
Returns:
true if we have shallow equality


Copyright © 2000-2002 The Scope Team. All Rights Reserved.