com.phasmidsoftware.gambit.attic

Members list

Type members

Classlikes

sealed trait BackedOutput[A <: Appendable & AutoCloseable] extends TypedOutput

Attributes

Supertypes
trait TypedOutput
trait Output
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
Known subtypes
sealed abstract class BufferedCharSequenceOutput[A <: Appendable & AutoCloseable & Flushable](val appendable: A, var indentation: CharSequence, val sb: StringBuilder = ...) extends CharacterOutput, BufferedOutput, BackedOutput[A]

Abstract class to combine the behaviors of CharacterOutput, BufferedOutput and BackedOutput.

Abstract class to combine the behaviors of CharacterOutput, BufferedOutput and BackedOutput.

Type parameters

A

the underlying (appendable) type.

Value parameters

appendable

the persistent store of characters.

indentation

the indentation to be used after a newline. NOTE: this is a var because sometimes when we concatenate Outputs, we have to update this value.

sb

the StringBuilder that we use as temporary storage of characters.

Attributes

Supertypes
trait BackedOutput[A]
trait TypedOutput
trait Output
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
Known subtypes
sealed trait BufferedOutput extends TypedOutput

Trait to define the behavior of a TypedOutput which has a buffer.

Trait to define the behavior of a TypedOutput which has a buffer.

Attributes

Supertypes
trait TypedOutput
trait Output
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
Known subtypes
sealed trait CharacterOutput extends TypedOutput

Attributes

Supertypes
trait TypedOutput
trait Output
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
Known subtypes
case class NonOutput() extends Appendable, Closeable, Flushable

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Flushable
trait Closeable
trait AutoCloseable
trait Appendable
class Object
trait Matchable
class Any
Show all
sealed trait Output extends AutoCloseable

Trait to define the behavior of an AutoCloseable that is a pseudo-monadic IO type for output.

Trait to define the behavior of an AutoCloseable that is a pseudo-monadic IO type for output.

In general, when two Outputs are concatenated (using ++), we merge the content of the Output on the right into the Output on the left. That way, it makes sense that the Output on the left is backed by a write-store (such as a Writer). The concatenation logic tries its best to keep things in order and appropriately backed.

NOTE: indentation also tends to be applied to the Output on the left. However, if new (unbacked) Outputs are created to be used for outputting indented values, then such Outputs should be explicitly indented also. A warning could be created if two Outputs are merged with different indents (but is currently commented out).

Attributes

Companion
object
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes
object Output

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Output.type
case class OutputException(w: String) extends Exception

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
trait Outputable[X]

A trait which provides the behavior of something that can be output to Output.

A trait which provides the behavior of something that can be output to Output.

Type parameters

X

the underlying type of the optional parameter to the output method.

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait TypedOutput extends Output

Trait to define the behavior of an Output with a particular OutputType.

Trait to define the behavior of an Output with a particular OutputType.

Attributes

Supertypes
trait Output
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes
case class UnbackedOutput(initialIndentation: CharSequence = ..., stringBuilder: StringBuilder = ...) extends BufferedCharSequenceOutput[NonOutput]

Case class implementing Output and based on a NonOutput. This type of Output is not backed by a writeable store. This class extends the abstract class BufferedCharSequenceOutput[NonOutput]. The following traits are implemented: Output, CharacterOutput, BufferedOutput, BackedOutput[NonOutput].

Case class implementing Output and based on a NonOutput. This type of Output is not backed by a writeable store. This class extends the abstract class BufferedCharSequenceOutput[NonOutput]. The following traits are implemented: Output, CharacterOutput, BufferedOutput, BackedOutput[NonOutput].

Value parameters

initialIndentation

the initial value of indentation.

stringBuilder

the StringBuilder used for buffering characters.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait TypedOutput
trait Output
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
case class WriterOutput(writer: Writer, initialIndentation: CharSequence = ..., stringBuilder: StringBuilder = ..., transform: CharSequence => CharSequence = ...) extends BufferedCharSequenceOutput[Writer]

Case class implementing Output and based on a Writer. This type of Output is backed by the given writer. This class extends the abstract class BufferedCharSequenceOutput[Writer]. The following traits are implemented: Output, CharacterOutput, BufferedOutput, BackedOutput[Writer].

Case class implementing Output and based on a Writer. This type of Output is backed by the given writer. This class extends the abstract class BufferedCharSequenceOutput[Writer]. The following traits are implemented: Output, CharacterOutput, BufferedOutput, BackedOutput[Writer].

Value parameters

initialIndentation

the initial value of indentation.

stringBuilder

the StringBuilder used for buffering characters.

writer

the appendable to which characters are flushed when appropriate.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait BackedOutput[Writer]
trait TypedOutput
trait Output
trait AutoCloseable
class Object
trait Matchable
class Any
Show all