net.javamud.data
Class PersistentSet

java.lang.Object
  |
  +--net.javamud.data.PersistentSet
All Implemented Interfaces:
Collection, Persisted, Set

public class PersistentSet
extends Object
implements Persisted, Set

An unordered set of unique items for storage. Stores Strings, PersistentObjects, PersistentProperties, or other PersistentSets.

Author:
Timothy Hinchcliffe
Created On:
13 April 2003

Field Summary
protected  Set items
          Actual container for this Set.
 
Constructor Summary
PersistentSet()
          Constructor for the PersistentSet object
 
Method Summary
 boolean add(PersistentObject item)
          Add a PersistentObject
 boolean add(PersistentProperties item)
          Add a PersistentProperties
 boolean add(PersistentSet item)
          Add a PersistentSet
 boolean add(String item)
          Add a String
 boolean addAll(Collection c)
          Import all objects from the collection to this.
 boolean addAll(PersistentSet set)
          Add everything from another PersistentSet into this one.
 void clear()
          Clear the set.
 boolean contains(Object o)
          See Set.contains(java.lang.Object)
 boolean containsAll(Collection c)
          See Set.contains(java.lang.Object)
 boolean equals(Object o)
          See Set.equals(java.lang.Object)
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Field Detail

items

protected Set items
Actual container for this Set.

Constructor Detail

PersistentSet

public PersistentSet()
Constructor for the PersistentSet object

Method Detail

add

public boolean add(String item)
Add a String

Parameters:
item - String to add
Returns:
See Set.add(java.lang.Object)
See Also:
Set.add(java.lang.Object)

add

public boolean add(PersistentProperties item)
Add a PersistentProperties

Parameters:
item - String to add
Returns:
See Set.add(java.lang.Object)
See Also:
Set.add(java.lang.Object)

add

public boolean add(PersistentSet item)
Add a PersistentSet

Parameters:
item - String to add
Returns:
See Set.add(java.lang.Object)
See Also:
Set.add(java.lang.Object)

add

public boolean add(PersistentObject item)
Add a PersistentObject

Parameters:
item - String to add
Returns:
See Set.add(java.lang.Object)
See Also:
Set.add(java.lang.Object)

addAll

public boolean addAll(PersistentSet set)
Add everything from another PersistentSet into this one.

Parameters:
set - The set to add.
Returns:
See Set.addAll(java.util.Collection)
See Also:
Set.addAll(java.util.Collection)

addAll

public boolean addAll(Collection c)
Import all objects from the collection to this.

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

clear

public void clear()
Clear the set.

Specified by:
clear in interface Set
See Also:
Set.clear()

contains

public boolean contains(Object o)
See Set.contains(java.lang.Object)

Specified by:
contains in interface Set
Parameters:
o - Description of the Parameter
Returns:
Description of the Return Value

containsAll

public boolean containsAll(Collection c)
See Set.contains(java.lang.Object)

Specified by:
containsAll in interface Set
Parameters:
c - Description of the Parameter
Returns:
Description of the Return Value

equals

public boolean equals(Object o)
See Set.equals(java.lang.Object)

Specified by:
equals in interface Set
Overrides:
equals in class Object
Parameters:
o - Description of the Parameter
Returns:
Description of the Return Value