org.progeeks.util
Class ContextList

java.lang.Object
  extended by org.progeeks.util.ConstrainedObservableList
      extended by org.progeeks.util.ContextList
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List, ObservableList

public class ContextList
extends ConstrainedObservableList

Special ConstrainedObservableList subclass that prevents CloseableContexts from being removed if they return false from their canRemove() method.

Version:
$Revision: 1.3 $
Author:
Paul Speed
See Also:
Serialized Form

Constructor Summary
ContextList()
           
ContextList(java.lang.String propertyName)
           
 
Method Summary
protected  boolean canRemove(java.lang.Object obj)
          Returns true if the object is not a CloseableContext or if it returns true from a canClose(isFullyVerified()) method call.
 boolean isFullyVerified()
          Returns true if the list fully verifies all closeable contexts before removal.
 void setFullyVerified(boolean flag)
          Set to true to fully verify all closeable contexts before removal.
 
Methods inherited from class org.progeeks.util.ConstrainedObservableList
add, add, addAll, addAll, addPropertyChangeListener, canAdd, clear, contains, containsAll, equals, fireElementsInserted, fireElementsModified, fireElementsRemoved, firePropertyChangeEvent, get, getPropertyName, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removePropertyChangeListener, retainAll, set, setList, size, subList, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContextList

public ContextList()

ContextList

public ContextList(java.lang.String propertyName)
Method Detail

setFullyVerified

public void setFullyVerified(boolean flag)
Set to true to fully verify all closeable contexts before removal.


isFullyVerified

public boolean isFullyVerified()
Returns true if the list fully verifies all closeable contexts before removal.


canRemove

protected boolean canRemove(java.lang.Object obj)
Returns true if the object is not a CloseableContext or if it returns true from a canClose(isFullyVerified()) method call.

Overrides:
canRemove in class ConstrainedObservableList


Copyright © 2002-2003 Paul Speed. All Rights Reserved.