org.scopemvc.core
Class IntIndexSelector

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

public final class IntIndexSelector
extends Selector

An implementation of Selector that identifies a property by its int index within the parent model object. This is used to access properties in java.util.List and Object[].

Created by Selector.fromInt(int) or Selector.fromString(String).

Version:
$Revision: 1.6 $ $Date: 2002/09/11 19:12:29 $
Author:
Steve Meyfroidt

Field Summary
 
Fields inherited from class org.scopemvc.core.Selector
DELIMITER
 
Method Summary
 int getIndex()
          Gets the index of the property in the list or Object[]
 java.lang.String getName()
          Gets the name of the selector
protected  Selector getShallowCopy()
          Creates a shallow copy of this selector
 int hashCode()
          Returns the hashCode
 void setIndex(int 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 int getIndex()
Gets the index of the property in the list or Object[]

Returns:
The index value

getName

public java.lang.String getName()
Gets the name of the selector

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

setIndex

public void setIndex(int 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

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 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.