RegexGrep (Java Functional Samples)
Date: 2020-08-07

simple

## Class RegexGrep

- java.lang.Object
- - simple.RegexGrep

-     public class RegexGrep
      extends java.lang.Object

  Sample continuous (streaming) regular expression grep topology application. This is a variant of the `Grep` application that demonstrates filtering using Java functional programming. This Java application builds a simple topology that watches a directory for files, reads each file and output lines that match a regular expression. Thus as each file is added to the directory, the application will read it and output matching lines.
  The application implements the typical pattern of code that declares a topology followed by submission of the topology to a Streams context `com.ibm.streamsx.topology.context.StreamsContext`.
  This demonstrates Java functional programming using an anonymous class.

  This may be executed from the `samples/java/functional` directory as:

  - `java -cp functionalsamples.jar:../../../com.ibm.streamsx.topology/lib/com.ibm.streamsx.topology.jar:$STREAMS_INSTALL/lib/com.ibm.streams.operator.samples.jar simple.RegexGrep CONTEXT_TYPE $HOME/books ".*Queen.*England.*"` - Run directly from the command line. CONTEXT_TYPE is one of:
    - `DISTRIBUTED` - Run as an IBM Streams distributed application.
    - `STANDALONE` - Run as an IBM Streams standalone application.
    - `EMBEDDED` - Run embedded within this JVM.
    - `BUNDLE` - Create an IBM Streams application bundle.
    - `TOOLKIT` - Create an IBM Streams application toolkit.
  - An application execution within your IDE once you set the class path to include the correct jars.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegexGrep()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(java.lang.String[] args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RegexGrep

          public RegexGrep()

  - ### Method Detail

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`