gov.sandia.cognition.math.matrix
Class VectorWriter

java.lang.Object
  extended by gov.sandia.cognition.math.matrix.VectorWriter

@CodeReview(reviewer="Jonathan McClain",
            date="2006-05-22",
            changesNeeded=false,
            comments="Looks fine.")
public class VectorWriter
extends Object

Writes a Vector to a Java-based Writer (files, etc.)

Since:
1.0
Author:
Kevin R. Dixon

Constructor Summary
VectorWriter(Writer writer)
          Creates a new instance of VectorWriter
 
Method Summary
 Writer getWriter()
          Getter for writer
 void setWriter(Writer writer)
          Setter for writer
 void write(Vector vector)
          Writes the given vector to the Java-based writer
 void writeCollection(Iterable<? extends Vector> vectors)
          Writes the collection of vectors to the Java-based writer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorWriter

public VectorWriter(Writer writer)
Creates a new instance of VectorWriter

Parameters:
writer - Java-based writer to spew out strings
Method Detail

write

public void write(Vector vector)
           throws IOException
Writes the given vector to the Java-based writer

Parameters:
vector - Vector to write to the Java-based writer
Throws:
IOException - on bad write

writeCollection

public void writeCollection(Iterable<? extends Vector> vectors)
                     throws IOException
Writes the collection of vectors to the Java-based writer

Parameters:
vectors - Collection of Vectors to write
Throws:
IOException - on bad write

getWriter

public Writer getWriter()
Getter for writer

Returns:
Java-based writer to spew out strings

setWriter

public void setWriter(Writer writer)
Setter for writer

Parameters:
writer - Java-based writer to spew out strings