Building Parsers with Java

sjm.examples.string
Class LowerCase

java.lang.Object
  |
  +--sjm.examples.string.StringFunction
        |
        +--sjm.examples.string.LowerCase

public class LowerCase
extends StringFunction

This class wraps a toLowerCase function around an instance of another StringFunction class.


Fields inherited from class sjm.examples.string.StringFunction
source
 
Constructor Summary
LowerCase()
          Construct a LowerCase function around the identity function, so that this object will just lowercase a supplied string.
LowerCase(StringFunction source)
          Construct a LowerCase function that will wrap itself around the supplied source.
 
Method Summary
 java.lang.String f(java.lang.String s)
          Return a lowercase version of the value of source.f(s), where s is the supplied string, and source is this function's source function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LowerCase

public LowerCase()
Construct a LowerCase function around the identity function, so that this object will just lowercase a supplied string.

LowerCase

public LowerCase(StringFunction source)
Construct a LowerCase function that will wrap itself around the supplied source.
Method Detail

f

public java.lang.String f(java.lang.String s)
Return a lowercase version of the value of source.f(s), where s is the supplied string, and source is this function's source function.
Overrides:
f in class StringFunction

by Steve Metsker