|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrails.game.ReportBuffer
public final class ReportBuffer
Class to write a log, and also to maintain a log message stack for writing to the UI. Each gameManager has one unique ReportBuffer, which is used by the public static methods. Messages before the creation of that buffer are kept in an internal initial queue. Also used for regression testing comparing the output of the report buffer.
Field Summary | |
---|---|
static java.lang.String |
ACTIVE_MESSAGE_INDICATOR
Indicator string to find the active message position in the parsed html document |
Constructor Summary | |
---|---|
ReportBuffer()
|
Method Summary | |
---|---|
static void |
add(java.lang.String message)
Add a message to the log buffer (and display it on the console) |
static void |
addComment(java.lang.String comment)
Add a user comment to the report window |
static void |
addWaiting(java.lang.String message)
|
static void |
clear()
clear the current buffer |
static void |
createNewReportItem(int index)
Creates a new report item |
static java.lang.String |
get()
Get the current log buffer, and clear it |
static void |
getAllWaiting()
|
static java.util.List<java.lang.String> |
getAsList()
return the current buffer as list |
static java.lang.String |
getComment()
Retrieves the current user comment |
static java.util.SortedMap<java.lang.Integer,java.lang.String> |
getCommentItems()
Retrieves all user comments |
static java.lang.String |
getLatestReportItems()
returns the latest report items |
static java.lang.String |
getReportItems()
|
static void |
setCommentItems(java.util.SortedMap<java.lang.Integer,java.lang.String> commentItems)
sets user comments |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ACTIVE_MESSAGE_INDICATOR
Constructor Detail |
---|
public ReportBuffer()
Method Detail |
---|
public static void createNewReportItem(int index)
public static java.lang.String getLatestReportItems()
public static java.lang.String getReportItems()
public static java.lang.String get()
public static void add(java.lang.String message)
public static void addComment(java.lang.String comment)
public static java.lang.String getComment()
public static java.util.SortedMap<java.lang.Integer,java.lang.String> getCommentItems()
public static void setCommentItems(java.util.SortedMap<java.lang.Integer,java.lang.String> commentItems)
public static java.util.List<java.lang.String> getAsList()
public static void clear()
public static void addWaiting(java.lang.String message)
public static void getAllWaiting()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |