org.crsh.text
Class ScreenBuffer

java.lang.Object
  extended by org.crsh.text.ScreenBuffer
All Implemented Interfaces:
Serializable, Appendable, Iterable<Object>, Screenable

public class ScreenBuffer
extends Object
implements Iterable<Object>, Serializable, Screenable

See Also:
Serialized Form

Field Summary
private  LinkedList<Object> chunks
          .
private  Style current
          .
private  Style next
          .
private  ScreenContext out
          Where we flush.
 
Constructor Summary
ScreenBuffer()
           
ScreenBuffer(ScreenContext out)
           
 
Method Summary
 ScreenBuffer append(char c)
           
 ScreenBuffer append(CharSequence s)
           
 ScreenBuffer append(CharSequence s, int start, int end)
           
 ScreenBuffer append(Iterable<?> data)
           
 ScreenBuffer append(Object... data)
           
 ScreenBuffer append(Object o)
           
 ScreenBuffer append(ScreenBuffer s)
           
 ScreenBuffer append(Style style)
           
 void clear()
           
 ScreenBuffer cls()
           
 boolean contains(Object o)
           
 boolean equals(Object obj)
           
 void flush()
           
 void format(Format format, Appendable appendable)
           
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<Object> iterator()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

chunks

private final LinkedList<Object> chunks
.


current

private Style current
.


next

private Style next
.


out

private final ScreenContext out
Where we flush.

Constructor Detail

ScreenBuffer

public ScreenBuffer()

ScreenBuffer

public ScreenBuffer(ScreenContext out)
Method Detail

iterator

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

format

public void format(Format format,
                   Appendable appendable)
            throws IOException
Throws:
IOException

append

public ScreenBuffer append(Iterable<?> data)
                    throws NullPointerException
Throws:
NullPointerException

append

public ScreenBuffer append(Object... data)
                    throws NullPointerException
Throws:
NullPointerException

cls

public ScreenBuffer cls()
Specified by:
cls in interface Screenable

append

public ScreenBuffer append(Style style)
                    throws NullPointerException
Specified by:
append in interface Screenable
Throws:
NullPointerException

append

public ScreenBuffer append(char c)
                    throws IOException
Specified by:
append in interface Appendable
Throws:
IOException

append

public ScreenBuffer append(CharSequence s)
Specified by:
append in interface Appendable

append

public ScreenBuffer append(CharSequence s,
                           int start,
                           int end)
Specified by:
append in interface Appendable

flush

public void flush()
           throws IOException
Throws:
IOException

append

public ScreenBuffer append(ScreenBuffer s)
                    throws NullPointerException
Throws:
NullPointerException

append

public ScreenBuffer append(Object o)
                    throws NullPointerException
Throws:
NullPointerException

contains

public boolean contains(Object o)

isEmpty

public boolean isEmpty()

clear

public void clear()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 eXo Platform SAS. All Rights Reserved.