Package org.tweetyproject.commons
Class Writer
- java.lang.Object
-
- org.tweetyproject.commons.Writer
-
- Direct Known Subclasses:
DefaultCondensedProbabilityDistributionWriter,DefaultProbabilityDistributionWriter,MlWriter,PlWriter
public abstract class Writer extends java.lang.ObjectThis class represents an abstract writer for writing objects into the file system.- Author:
- Matthias Thimm, Anna Gessler
-
-
Method Summary
Modifier and Type Method Description java.lang.ObjectgetObjectToBePrinted()Returns the object of this writer.voidsetObjectToBePrinted(java.lang.Object obj)Sets the object of this writer.voidwriteToFile(java.lang.String filename)Writes the object into the given file.abstract java.lang.StringwriteToString()Writes the object into a string.
-
-
-
Method Detail
-
setObjectToBePrinted
public void setObjectToBePrinted(java.lang.Object obj)
Sets the object of this writer.- Parameters:
obj- some object
-
getObjectToBePrinted
public java.lang.Object getObjectToBePrinted()
Returns the object of this writer.- Returns:
- the object of this writer.
-
writeToString
public abstract java.lang.String writeToString()
Writes the object into a string.- Returns:
- the string representing the object.
-
writeToFile
public void writeToFile(java.lang.String filename) throws java.io.IOExceptionWrites the object into the given file.- Parameters:
filename- the name of the file.- Throws:
java.io.IOException- if an IO issue occurs.
-
-