FileDocCategorySizeDatePackage
ToUpperCase.javaAPI DocAndroid 5.1 API1667Thu Mar 12 22:22:30 GMT 2015android.filterpacks.text

ToUpperCase

public class ToUpperCase extends android.filterfw.core.Filter
hide

Fields Summary
private android.filterfw.core.FrameFormat
mOutputFormat
Constructors Summary
public ToUpperCase(String name)

        super(name);
    
Methods Summary
public voidprocess(android.filterfw.core.FilterContext env)

        Frame input = pullInput("mixedcase");
        String inputString = (String)input.getObjectValue();

        Frame output = env.getFrameManager().newFrame(mOutputFormat);
        output.setObjectValue(inputString.toUpperCase(Locale.getDefault()));

        pushOutput("uppercase", output);
    
public voidsetupPorts()

        mOutputFormat = ObjectFormat.fromClass(String.class, FrameFormat.TARGET_SIMPLE);
        addMaskedInputPort("mixedcase", mOutputFormat);
        addOutputPort("uppercase", mOutputFormat);