jfun.parsec
Class String2Value
java.lang.Object
jfun.parsec.String2Value
- All Implemented Interfaces:
- java.io.Serializable, FromString
public class String2Value
- extends java.lang.Object
- implements FromString
This implementation of FromString simply returns an object for any parameter.
- Author:
- Ben Yu
Mar 29, 2006 9:57:03 PM
- See Also:
- Serialized Form
Constructor Summary |
String2Value(java.lang.Object val)
Create a String2Value instance. |
Method Summary |
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
fromString(int from,
int len,
java.lang.String s)
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
String2Value
public String2Value(java.lang.Object val)
- Create a String2Value instance.
- Parameters:
val
- the value to be returned by fromString(int, int, String)
fromString
public java.lang.Object fromString(int from,
int len,
java.lang.String s)
- Specified by:
fromString
in interface FromString
- Parameters:
from
- the starting index of this token.len
- the length of this token.s
- the string.
- Returns:
- the object.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object