org.jcreme.processing
Class ParseConsumer

java.lang.Object
  extended byorg.jcreme.processing.DefaultConsumer
      extended byorg.jcreme.processing.ParseConsumer
All Implemented Interfaces:
Consumer

public class ParseConsumer
extends DefaultConsumer

This consumer is designed to consume String objects. It may be used to feed a ParseProducer. Empty strings and nulls are skipped to ensure that only potentially productive Strings are accessible to the producer.

Author:
$Author: dbregeon $

Constructor Summary
ParseConsumer(Producer provider)
          Creates a new instance of ParseConsumer
 
Method Summary
 java.lang.Object consumeItem()
          Consumes a new item.
 
Methods inherited from class org.jcreme.processing.DefaultConsumer
getProvider, setProvider, validateItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseConsumer

public ParseConsumer(Producer provider)
              throws java.lang.IllegalArgumentException
Creates a new instance of ParseConsumer

Parameters:
provider - the producer from which this consumer gets Strings.
Throws:
java.lang.IllegalArgumentException - if the provider parameter is null.
Method Detail

consumeItem

public java.lang.Object consumeItem()
Consumes a new item.

Specified by:
consumeItem in interface Consumer
Overrides:
consumeItem in class DefaultConsumer
Returns:
The object produced by the consumption of a new item.
See Also:
Consumer.consumeItem()


Copyright 2006 null. All Rights Reserved.