com.threerings.util
Class StreamableHashSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet<E>
com.threerings.util.StreamableHashSet<E>
- Type Parameters:
E - the type of element stored in this set.
- All Implemented Interfaces:
- Streamable, Serializable, Cloneable, Iterable<E>, Collection<E>, Set<E>
public class StreamableHashSet<E>
- extends HashSet<E>
- implements Streamable
A HashSet extension that can be streamed. The values in the set must also be of
streamable types.
- See Also:
Streamable,
Serialized Form
|
Constructor Summary |
StreamableHashSet()
Constructs an empty hash set with the default number of hash buckets. |
StreamableHashSet(int buckets,
float loadFactor)
Constructs an empty hash set with the specified number of hash buckets. |
StreamableHashSet
public StreamableHashSet(int buckets,
float loadFactor)
- Constructs an empty hash set with the specified number of hash buckets.
StreamableHashSet
public StreamableHashSet()
- Constructs an empty hash set with the default number of hash buckets.
newSet
public static <E> StreamableHashSet<E> newSet()
- Creates an empty StreamableHashSet with the default number of hash buckets.
writeObject
public void writeObject(ObjectOutputStream out)
throws IOException
- Writes our custom streamable fields.
- Throws:
IOException
readObject
public void readObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
- Reads our custom streamable fields.
- Throws:
IOException
ClassNotFoundException