Mp3dings 
20100427

net.sourceforge.mp3dings.utils
Class BeanSet

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractSet
          extended by java.util.TreeSet
              extended by net.sourceforge.mp3dings.utils.BeanSet
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, NavigableSet, Set, SortedSet

public class BeanSet
extends TreeSet

The Set view of a BeanSet always contains all elements that have been added to it. In contrast the ListModel view only contains those elements that are instances of the current type. *

Author:
ringler
See Also:
Serialized Form

Nested Class Summary
static class BeanSet.ListModel
          A List Model view of the BeanSet.
 
Constructor Summary
BeanSet()
          Constructs a new BeanSet.
 
Method Summary
 boolean add(Object o)
          Description of the Method
 boolean addAll(Collection c)
          Adds a feature to the All attribute of the BeanSet object
 void addChangeListener(ChangeListener l)
          Adds a feature to the ChangeListener attribute of the BeanSet object
 void clear()
          Description of the Method
protected  void fireStateChanged(Class beantype)
          Informs comboboxes that something has changed.
 Bean getBeanForID(long id)
          Gets the beanForID attribute of the BeanSet object
 Bean getBeanForName(String name)
          Gets the beanForName attribute of the BeanSet object
 BeanSet.ListModel getNewListModel()
          Gets the newListModel attribute of the BeanSet object
 boolean remove(Object o)
          Description of the Method
 boolean removeAll(Collection c)
          Description of the Method
 void removeChangeListener(ChangeListener l)
          Description of the Method
 boolean renameBean(Bean bean, String newName)
          Description of the Method
 
Methods inherited from class java.util.TreeSet
ceiling, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, size, subSet, subSet, tailSet, tailSet
 
Methods inherited from class java.util.AbstractSet
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, retainAll, toArray, toArray
 

Constructor Detail

BeanSet

public BeanSet()
Constructs a new BeanSet.

Method Detail

getNewListModel

public BeanSet.ListModel getNewListModel()
Gets the newListModel attribute of the BeanSet object

Returns:
The newListModel value

renameBean

public boolean renameBean(Bean bean,
                          String newName)
Description of the Method

Parameters:
bean - Description of the Parameter
newName - Description of the Parameter
Returns:
Description of the Return Value

getBeanForName

public Bean getBeanForName(String name)
Gets the beanForName attribute of the BeanSet object

Parameters:
name - Description of the Parameter
Returns:
The beanForName value

getBeanForID

public Bean getBeanForID(long id)
Gets the beanForID attribute of the BeanSet object

Parameters:
id - Description of the Parameter
Returns:
The beanForID value

add

public boolean add(Object o)
Description of the Method

Specified by:
add in interface Collection
Specified by:
add in interface Set
Overrides:
add in class TreeSet
Parameters:
o - Description of the Parameter
Returns:
Description of the Return Value

addAll

public boolean addAll(Collection c)
Adds a feature to the All attribute of the BeanSet object

Specified by:
addAll in interface Collection
Specified by:
addAll in interface Set
Overrides:
addAll in class TreeSet
Parameters:
c - The feature to be added to the All attribute
Returns:
Description of the Return Value

clear

public void clear()
Description of the Method

Specified by:
clear in interface Collection
Specified by:
clear in interface Set
Overrides:
clear in class TreeSet

remove

public boolean remove(Object o)
Description of the Method

Specified by:
remove in interface Collection
Specified by:
remove in interface Set
Overrides:
remove in class TreeSet
Parameters:
o - Description of the Parameter
Returns:
Description of the Return Value

removeAll

public boolean removeAll(Collection c)
Description of the Method

Specified by:
removeAll in interface Collection
Specified by:
removeAll in interface Set
Overrides:
removeAll in class AbstractSet
Parameters:
c - Description of the Parameter
Returns:
Description of the Return Value

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a feature to the ChangeListener attribute of the BeanSet object

Parameters:
l - The feature to be added to the ChangeListener attribute

removeChangeListener

public void removeChangeListener(ChangeListener l)
Description of the Method

Parameters:
l - Description of the Parameter

fireStateChanged

protected void fireStateChanged(Class beantype)
Informs comboboxes that something has changed.

Parameters:
beantype - Description of the Parameter

Mp3dings 
20100427