ariba.util.io
Class FirstTokenKeyCSVConsumer

java.lang.Object
  extended by ariba.util.io.FirstTokenKeyCSVConsumer
All Implemented Interfaces:
CSVConsumer

public class FirstTokenKeyCSVConsumer
extends java.lang.Object
implements CSVConsumer

The FirstTokenKeyCSVConsumer stores the first token as the key and the vector of tokens as the value in a map specified during the construction of the class.


Constructor Summary
FirstTokenKeyCSVConsumer()
           
 
Method Summary
 void consumeLineOfTokens(java.lang.String path, int lineNumber, java.util.List line)
          Called once per CSV line read.
 java.util.List get(java.lang.String key, java.util.List defaultValue)
          Get a List representing a line read in from the file, given a key (the first token in the line).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirstTokenKeyCSVConsumer

public FirstTokenKeyCSVConsumer()
Method Detail

consumeLineOfTokens

public void consumeLineOfTokens(java.lang.String path,
                                int lineNumber,
                                java.util.List line)
Called once per CSV line read.

Specified by:
consumeLineOfTokens in interface CSVConsumer
Parameters:
path - the CSV source file
lineNumber - the current line being reported, 1-based.
line - a List of tokens parsed from a one line in the file

get

public java.util.List get(java.lang.String key,
                          java.util.List defaultValue)
Get a List representing a line read in from the file, given a key (the first token in the line).

Parameters:
key - the key to find a line read from the file
defaultValue - return this List if the key is not found.


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.