Class TuplesLinkPredictionFormat.Writer
java.lang.Object
es.uam.eps.ir.relison.links.linkprediction.io.TuplesLinkPredictionFormat.Writer
- All Implemented Interfaces:
- LinkPredictionFormat.Writer<U>,- java.io.Closeable,- java.lang.AutoCloseable,- java.util.function.Consumer<Prediction<U>>
- Enclosing class:
- TuplesLinkPredictionFormat<U>
protected class TuplesLinkPredictionFormat.Writer extends java.lang.Object implements LinkPredictionFormat.Writer<U>
Writer for the format.
- 
Field SummaryFields Modifier and Type Field Description private java.io.BufferedWriterwriterA buffered writer.
- 
Constructor SummaryConstructors Constructor Description Writer(java.io.OutputStream out)Constructor.
- 
Method SummaryModifier and Type Method Description voidclose()voidwrite(Prediction<U> prediction)Writes the prediction.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface es.uam.eps.ir.relison.links.linkprediction.io.LinkPredictionFormat.Writeraccept
- 
Field Details- 
writerprivate final java.io.BufferedWriter writerA buffered writer.
 
- 
- 
Constructor Details- 
Writerpublic Writer(java.io.OutputStream out)Constructor.- Parameters:
- out- an output stream where link prediction is written.
 
 
- 
- 
Method Details- 
writeDescription copied from interface:LinkPredictionFormat.WriterWrites the prediction.- Specified by:
- writein interface- LinkPredictionFormat.Writer<U>
- Parameters:
- prediction- to be written
- Throws:
- java.io.IOException- when IO error
 
- 
closepublic void close() throws java.io.IOException- Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.io.Closeable
- Throws:
- java.io.IOException
 
 
-