no.uio.labmed.pdb
Class ChangeIndicator

java.lang.Object
  |
  +--no.uio.labmed.pdb.ChangeIndicator
Direct Known Subclasses:
ChangeIntIndicator, ChangeObjectIndicator

public abstract class ChangeIndicator
extends java.lang.Object

Abstract class for returning a flag to tell if a value has been changed.

Note that the method should implement, in addition to void resetThis() which is declared abstractly, a method boolean changed(?) where ? may be anything. The idea is to return true if the value has changed. Note that boolean changed(Object) and boolean changed(int) are given initial initial implementations which always return false to allow for anonymous extentions.

An alternative use is to make this indicate the start of a list when that start is indicated in a special way.

These instances may be nested, causing a change to reset the stored values in the sub-instance.


Field Summary
 ChangeIndicator sub
           
 
Constructor Summary
ChangeIndicator()
           
 
Method Summary
 boolean changed(int t)
           
 boolean changed(java.lang.Object t)
           
 ChangeIndicator nest(ChangeIndicator sub)
           
 void reset()
           
 void resetSub()
           
abstract  void resetThis()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sub

public ChangeIndicator sub
Constructor Detail

ChangeIndicator

public ChangeIndicator()
Method Detail

resetThis

public abstract void resetThis()

reset

public void reset()

resetSub

public void resetSub()

changed

public boolean changed(java.lang.Object t)

changed

public boolean changed(int t)

nest

public ChangeIndicator nest(ChangeIndicator sub)