MOEA Framework 2.12
API Specification

org.moeaframework.analysis.sensitivity
Class SampleReader

java.lang.Object
  extended by org.moeaframework.analysis.sensitivity.SampleReader
All Implemented Interfaces:
Closeable, Iterable<Properties>, Iterator<Properties>

public class SampleReader
extends Object
implements Iterable<Properties>, Iterator<Properties>, Closeable

Reads the parameter samples from the output of SampleGenerator. The column ordering in the sample file matches the ordering of parameters in a ParameterFile. The read Properties map the parameter name to the parameter value.

See Also:
SampleGenerator, ParameterFile

Constructor Summary
SampleReader(File file, ParameterFile parameterFile)
          Constructs a sample reader for reading parameter samples from the specified file.
SampleReader(Reader reader, ParameterFile parameterFile)
          Constructs a sample reader for reading parameter samples from the underlying reader.
 
Method Summary
 void close()
           
 boolean hasNext()
           
 Iterator<Properties> iterator()
           
 Properties next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleReader

public SampleReader(File file,
                    ParameterFile parameterFile)
             throws IOException
Constructs a sample reader for reading parameter samples from the specified file.

Parameters:
file - the parameter sample file
parameterFile - the parameter definition file
Throws:
IOException - if an I/O error occurred

SampleReader

public SampleReader(Reader reader,
                    ParameterFile parameterFile)
Constructs a sample reader for reading parameter samples from the underlying reader.

Parameters:
reader - the underlying reader
parameterFile - the parameter definition file
Method Detail

iterator

public Iterator<Properties> iterator()
Specified by:
iterator in interface Iterable<Properties>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Properties>

next

public Properties next()
Specified by:
next in interface Iterator<Properties>

remove

public void remove()
Specified by:
remove in interface Iterator<Properties>

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!