net.refractions.udig.tools.edit.support
Class Selection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<Point>
          extended by net.refractions.udig.tools.edit.support.Selection
All Implemented Interfaces:
java.lang.Iterable<Point>, java.util.Collection<Point>, java.util.Set<Point>
Direct Known Subclasses:
EditGeomSelection

public class Selection
extends java.util.AbstractSet<Point>
implements java.util.Set<Point>

A set of points that are on the EditBlackboard. Only the edit black board can edit this set. All public add methods will throw and exception.

Since:
1.1.0
Author:
jones

Field Summary
protected  net.refractions.udig.tools.edit.support.Selection.BlackboardListener blackboardListener
           
protected  java.util.Map<Point,java.util.Collection<LazyCoord>> coordMap
           
 
Constructor Summary
Selection(EditBlackboard blackboard)
           
Selection(Selection selection2)
           
 
Method Summary
protected  boolean addInternal(Point o)
           
 void assertValid()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection<?> c)
           
 void disconnect()
           
protected  net.refractions.udig.tools.edit.support.Selection.BlackboardListener getBlackboardListener()
           
 boolean isEmpty()
           
 boolean isNotify()
           
 java.util.Iterator<Point> iterator()
           
protected  void notifyListeners(java.util.Set<Point> added, java.util.Set<Point> removed)
           
 void setNotify(boolean notify)
           
 int size()
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, remove, retainAll
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, equals, hashCode, remove, removeAll, retainAll
 

Field Detail

coordMap

protected java.util.Map<Point,java.util.Collection<LazyCoord>> coordMap

blackboardListener

protected net.refractions.udig.tools.edit.support.Selection.BlackboardListener blackboardListener
Constructor Detail

Selection

public Selection(EditBlackboard blackboard)

Selection

public Selection(Selection selection2)
Method Detail

getBlackboardListener

protected net.refractions.udig.tools.edit.support.Selection.BlackboardListener getBlackboardListener()

addInternal

protected boolean addInternal(Point o)
Parameters:
o -
coords -
Returns:

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<Point>
Specified by:
contains in interface java.util.Set<Point>
Overrides:
contains in class java.util.AbstractCollection<Point>

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<Point>
Specified by:
containsAll in interface java.util.Set<Point>
Overrides:
containsAll in class java.util.AbstractCollection<Point>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<Point>
Specified by:
isEmpty in interface java.util.Set<Point>
Overrides:
isEmpty in class java.util.AbstractCollection<Point>

iterator

public java.util.Iterator<Point> iterator()
Specified by:
iterator in interface java.lang.Iterable<Point>
Specified by:
iterator in interface java.util.Collection<Point>
Specified by:
iterator in interface java.util.Set<Point>
Specified by:
iterator in class java.util.AbstractCollection<Point>

size

public int size()
Specified by:
size in interface java.util.Collection<Point>
Specified by:
size in interface java.util.Set<Point>
Specified by:
size in class java.util.AbstractCollection<Point>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<Point>
Specified by:
toArray in interface java.util.Set<Point>
Overrides:
toArray in class java.util.AbstractCollection<Point>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface java.util.Collection<Point>
Specified by:
toArray in interface java.util.Set<Point>
Overrides:
toArray in class java.util.AbstractCollection<Point>

notifyListeners

protected void notifyListeners(java.util.Set<Point> added,
                               java.util.Set<Point> removed)

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractCollection<Point>

disconnect

public void disconnect()

isNotify

public boolean isNotify()

setNotify

public void setNotify(boolean notify)

assertValid

public void assertValid()