Trull

edu.luc.cs.trull.demo.counter
Class CompositeCounter

java.lang.Object
  extended by edu.luc.cs.trull.EmptyComponent
      extended by edu.luc.cs.trull.TerminatingComponent
          extended by edu.luc.cs.trull.AbstractComponent
              extended by edu.luc.cs.trull.AbstractCombinator
                  extended by edu.luc.cs.trull.SingleChildCombinator
                      extended by edu.luc.cs.trull.Rename
                          extended by edu.luc.cs.trull.Local
                              extended by edu.luc.cs.trull.demo.counter.CompositeCounter
All Implemented Interfaces:
Combinator, Component, EventLabels, PropertyChangeSource, Startable, Suspendable, Terminating, java.beans.PropertyChangeListener, java.util.EventListener

public class CompositeCounter
extends Local
implements EventLabels

A composite counter suitable for building a multi-digit counter from two existing carry counters. The overflow of the less significant digits (c1) increments the more significant digits (c2).

view Triveni source


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.luc.cs.trull.Rename
Rename.LocalListener
 
Nested classes/interfaces inherited from class edu.luc.cs.trull.AbstractCombinator
AbstractCombinator.DefaultTerminationListener
 
Field Summary
private  Component c1
           
private  Component c2
           
(package private)  java.lang.String CARRY
           
 
Fields inherited from class edu.luc.cs.trull.AbstractCombinator
components
 
Fields inherited from interface edu.luc.cs.trull.demo.counter.EventLabels
DOWN, OUCH, OVERFLOW, PRESSED, RESET, TICK, UP
 
Constructor Summary
CompositeCounter(Component c1, Component c2)
           
 
Method Summary
 
Methods inherited from class edu.luc.cs.trull.Rename
addEventRenaming, getChildTerminationListener, getDefaultChild, getEventRenamings, getInternalListener, getLocalEvents, propertyChange, removeEventRenaming, setLocalEvent, setLocalEvents, setLocalEvents
 
Methods inherited from class edu.luc.cs.trull.SingleChildCombinator
addComponent, getChild, removeComponent, resume, start, stop, suspend
 
Methods inherited from class edu.luc.cs.trull.AbstractCombinator
addComponent, addComponent, getComponent, getComponentCount, getComponents, removeAllComponents, removeComponent
 
Methods inherited from class edu.luc.cs.trull.AbstractComponent
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getExternalListeners, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from class edu.luc.cs.trull.TerminatingComponent
fireTermination, getParent, getTermEvent, scheduleTermination, setTerminationListener
 
Methods inherited from class edu.luc.cs.trull.EmptyComponent
getTerminationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.luc.cs.trull.PropertyChangeSource
addPropertyChangeListener, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from interface edu.luc.cs.trull.Terminating
getTerminationListener, setTerminationListener
 

Field Detail

c1

private Component c1

c2

private Component c2

CARRY

final java.lang.String CARRY
See Also:
Constant Field Values
Constructor Detail

CompositeCounter

public CompositeCounter(Component c1,
                        Component c2)

Trull

http://www.cs.luc.edu/trull/