|
|||||||||
| Home >> All >> org >> scopemvc >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.scopemvc.core
Class StringIndexSelector

java.lang.Objectorg.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) 55 .
- Version:
- $Revision: 1.2 $ $Date: 2002/01/12 09:35:40 $
| Field Summary | |
private java.lang.String |
index
The String index of the selected property. |
| Fields inherited from class org.scopemvc.core.Selector |
DELIMITER |
| Constructor Summary | |
(package private) |
StringIndexSelector(java.lang.String inIndex)
Package private for factory to create. |
| Method Summary | |
java.lang.String |
getIndex()
|
java.lang.String |
getName()
Used to serialise Selectors Selector.asString(org.scopemvc.core.Selector) 55
and for debug by Selector.toString() 55 . |
protected Selector |
getShallowCopy()
Return a shallow copy of the head of this. |
int |
hashCode()
Get a value that represents this Object, as uniquely as possible within the confines of an int. |
void |
setIndex(java.lang.String inIndex)
|
protected boolean |
shallowEquals(Selector inSelector)
Compare the head Selector of this
against the head of another Selector list --
ie a shallow compare operation (not including the
chained selectors). |
| Methods inherited from class org.scopemvc.core.Selector |
asString, chain, deepClone, equals, fromInt, fromString, getLast, getNext, removeLast, setNext, startsWith, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
index
private java.lang.String index
- The
Stringindex of the selected property. Immutable after construction.
| Constructor Detail |
StringIndexSelector
StringIndexSelector(java.lang.String inIndex)
- Package private for factory to create.
| Method Detail |
getIndex
public final java.lang.String getIndex()
setIndex
public void setIndex(java.lang.String inIndex)
shallowEquals
protected final boolean shallowEquals(Selector inSelector)
- Description copied from class:
Selector - Compare the head Selector of
thisagainst the head of another Selector list -- ie a shallow compare operation (not including the chained selectors).- Specified by:
shallowEqualsin classSelector
getName
public final java.lang.String getName()
- Description copied from class:
Selector - Used to serialise Selectors
Selector.asString(org.scopemvc.core.Selector)55 and for debug bySelector.toString()55 . ***** public access for test cases -- this is nasty.
getShallowCopy
protected Selector getShallowCopy()
- Description copied from class:
Selector - Return a shallow copy of the head of
this.- Specified by:
getShallowCopyin classSelector
hashCode
public int hashCode()
- Description copied from class:
java.lang.Object - Get a value that represents this Object, as uniquely as
possible within the confines of an int.
There are some requirements on this method which subclasses must follow:
- Semantic equality implies identical hashcodes. In other
words, if
a.equals(b)is true, thena.hashCode() == b.hashCode()must be as well. However, the reverse is not necessarily true, and two objects may have the same hashcode without being equal. - It must be consistent. Whichever value o.hashCode() returns on the first invocation must be the value returned on all later invocations as long as the object exists. Notice, however, that the result of hashCode may change between separate executions of a Virtual Machine, because it is not invoked on the same object.
Notice that since
hashCodeis used in java.util.Hashtable and other hashing classes, a poor implementation will degrade the performance of hashing (so don't blindly implement it as returning a constant!). Also, if calculating the hash is time-consuming, a class may consider caching the results.The default implementation returns
System.identityHashCode(this) - Semantic equality implies identical hashcodes. In other
words, if
|
|||||||||
| Home >> All >> org >> scopemvc >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC