cynosurex.lang
Class TextDistributor
java.lang.Object
cynosurex.lang.TextDistributor
- All Implemented Interfaces:
- cynosurex.internal.AuthorCommon, cynosurex.internal.CommonInterface, cynosurex.internal.CompanyCommon
public class TextDistributor
- extends java.lang.Object
- implements cynosurex.internal.CommonInterface
This class distributes text messages to different systems.
Thus, abstracting the output to screen from the actual output
method. This class is able to send text to any class that
implements the TextReceiver interface.
- Version:
- 1.0
- Author:
- Chieh Cheng
- See Also:
TextReceiver
Fields inherited from interface cynosurex.internal.CommonInterface |
copyright, copyrightYears, notice, program, version |
Fields inherited from interface cynosurex.internal.AuthorCommon |
author, copyrightSymbol, noticeMsg, rights |
Fields inherited from interface cynosurex.internal.CompanyCommon |
company, email, website |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextDistributor
public TextDistributor()
addTextReceiver
public void addTextReceiver(TextReceiver receiver)
- Add a TextReceiver object to a list of receivers.
- Parameters:
receiver
- The TextReceiver object to add.
distribute
public void distribute(java.lang.String text)
- This method distributes the text message to each of the
TextReceivers in the list.
- Parameters:
text
- The text to distribute to each TextReceiver.
removeAllTextReceivers
public void removeAllTextReceivers()
removeTextReceiver
public void removeTextReceiver(TextReceiver receiver)
- This method removes one TextReceiver object from the list.
- Parameters:
receiver
- The TextReceiver to remove from the list.