com.rubecula.darwin.domain.helper
Class Census_Sink
java.lang.Object
com.rubecula.darwin.domain.helper.Sink_
com.rubecula.darwin.domain.helper.Census_Sink
- All Implemented Interfaces:
- Census, Sink, SinkCensus, java.io.Closeable, java.io.Flushable, java.lang.Appendable
- Direct Known Subclasses:
- Census_Darwinian, Census_Standard
public abstract class Census_Sink
- extends Sink_
- implements SinkCensus
Base implementation the SinkCensus
interface.
- Author:
- Robin Hillyard
Fields inherited from class com.rubecula.darwin.domain.helper.Sink_ |
LOG |
Fields inherited from interface com.rubecula.darwin.domain.helper.Sink |
NEWLINE |
Constructor Summary |
protected |
Census_Sink(java.io.PrintWriter printWriter)
|
Method Summary |
java.io.PrintWriter |
append(java.lang.CharSequence csq)
|
void |
census(Censusible individual,
int depth,
java.lang.Object context)
Collect and process census information about the individual specified. |
void |
close()
Do nothing |
boolean |
equals(java.lang.Object obj)
|
void |
flush()
Do nothing |
java.io.PrintWriter |
getPrintWriter()
TODO consider eliminating this method. |
int |
hashCode()
|
void |
present(java.lang.String string,
java.lang.Object context)
Append the string to the current census. |
void |
print(java.lang.String s)
|
void |
println()
|
void |
println(java.lang.String x)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Appendable |
append, append |
Census_Sink
protected Census_Sink(java.io.PrintWriter printWriter)
append
public java.io.PrintWriter append(java.lang.CharSequence csq)
- Specified by:
append
in interface java.lang.Appendable
- See Also:
Appendable.append(java.lang.CharSequence)
census
public void census(Censusible individual,
int depth,
java.lang.Object context)
- Description copied from interface:
Census
- Collect and process census information about the individual specified.
- Specified by:
census
in interface Census
- Parameters:
individual
- the object to be censused.depth
- the number of levels of depth which shall be censused
below this object.context
- an arbitrary object which defines the context in which this
census is happening.- See Also:
Census.census(com.rubecula.darwin.domain.helper.Censusible,
int, java.lang.Object)
close
public void close()
- Description copied from class:
Sink_
- Do nothing
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class Sink_
- See Also:
Sink_.close()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
- See Also:
Object.equals(java.lang.Object)
flush
public void flush()
- Description copied from class:
Sink_
- Do nothing
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class Sink_
- See Also:
Sink_.flush()
getPrintWriter
public java.io.PrintWriter getPrintWriter()
- Description copied from interface:
SinkCensus
- TODO consider eliminating this method.
- Specified by:
getPrintWriter
in interface SinkCensus
- Returns:
- the print writer for this SinkCensus
- See Also:
SinkCensus.getPrintWriter()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
- See Also:
Object.hashCode()
present
public void present(java.lang.String string,
java.lang.Object context)
- Description copied from interface:
Census
- Append the string to the current census.
- Specified by:
present
in interface Census
- Parameters:
string
- the string value of the censuscontext
- an arbitrary object which defines the context in which this
census is happening.- See Also:
Census.present(java.lang.String,
java.lang.Object)
print
public void print(java.lang.String s)
- Specified by:
print
in interface SinkCensus
- Parameters:
s
- - See Also:
PrintWriter.print(java.lang.String)
println
public void println()
- Specified by:
println
in interface SinkCensus
- See Also:
PrintWriter.println()
println
public void println(java.lang.String x)
- Specified by:
println
in interface SinkCensus
- Parameters:
x
- - See Also:
PrintWriter.println(java.lang.String)
Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.