Package com.stardog.stark.io

# Class CollectingRDFHandler<T>

java.lang.Object
com.stardog.stark.io.AbstractRDFHandler
com.stardog.stark.io.CollectingRDFHandler<T>

All Implemented Interfaces:
  `RDFHandler`

public final class CollectingRDFHandler<T> extends AbstractRDFHandler

Simple `RDFHandler` that will collect the `statements` and return a result.

Since:
  1.0
Version:
  1.0
Author:
  Michael Grove

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CollectingRDFHandler(Consumer<Statement> theConsumer, Supplier<T> theResult)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `handle(Statement theStmt)`
  Event for when a statement was encountered
  `T`
  `result()`
  Return the result of the collected data

  ### Methods inherited from class com.stardog.stark.io.AbstractRDFHandler

  `end, namespace, start`

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

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

- ## Constructor Details

  - ### CollectingRDFHandler

    public CollectingRDFHandler(Consumer<Statement> theConsumer, Supplier<T> theResult)

- ## Method Details

  - ### handle

    public void handle(@Nonnull Statement theStmt)
    Event for when a statement was encountered
    Parameters:
      `theStmt` - the statement

  - ### result

    public T result()
    Return the result of the collected data
    Returns:
      the result