Building Parsers with Java

sjm.examples.string
Class UpperCase

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

public class UpperCase
extends StringFunction

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


Fields inherited from class sjm.examples.string.StringFunction
source
 
Constructor Summary
UpperCase()
          Construct an UpperCase function around the identity function, so that this object will just upcase a supplied string.
UpperCase(StringFunction source)
          Construct an UpperCase function that will wrap itself around the supplied source.
 
Method Summary
 java.lang.String f(java.lang.String s)
          Return an uppercase 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

UpperCase

public UpperCase()
Construct an UpperCase function around the identity function, so that this object will just upcase a supplied string.

UpperCase

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

f

public java.lang.String f(java.lang.String s)
Return an uppercase 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