TKey - Specifies the type of keys in the sets.public class FSetContainer64<TKey> extends java.lang.Object implements IDisposable
Remarks: The container is persistent (stored on the hard drive) and can contain at most 281,474,976,710,656 sets.
| Constructor and Description |
|---|
FSetContainer64(java.lang.Class<TKey> keyType)
Creates an empty container that holds sets
of the specified type.
|
FSetContainer64(java.lang.Class<TKey> keyType,
java.lang.String fileName,
FileMode mode)
Constructs an FSetContainer64 instance using the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Clear()
Removes all sets from the parent container.
|
void |
Close()
Closes the file and releases any resources
associated with the current buffered stream.
|
void |
Dispose()
Closes the file and releases any resources
associated with the current buffered stream.
|
FSet64<TKey> |
Item(int index)
Gets the element at the specified position.
|
FSet64<TKey> |
NewSet(boolean unique)
Creates an empty set container using the default comparator.
|
FSet64<TKey> |
NewSet(IFunc2Arg<TKey,TKey,java.lang.Boolean> keyCompare,
boolean unique)
Creates an empty set container using the specified comparator.
|
boolean |
Remove(FSet64<TKey> list)
Removes the specified object from the container.
|
void |
SetTemp(boolean value) |
long |
Size()
Returns the number of elements in the container.
|
public FSetContainer64(java.lang.Class<TKey> keyType)
keyType - The specified Class<TKey> type.public FSetContainer64(java.lang.Class<TKey> keyType, java.lang.String fileName, FileMode mode)
Remarks: The container is persistent (saved on the hard drive), and the Close() method must always be called to flush the internal buffers.
keyType - The specified Class<TKey> type.fileName - The specified file.mode - A FileMode constant (Open or Create) that determines
how to open or create the file.ArgumentException - Thrown when the
specified mode is different than Open or Create.public void Close()
public void Dispose()
Dispose in interface IDisposablepublic FSet64<TKey> NewSet(boolean unique)
unique - A boolean value indicating if the set
allows duplicates.public FSet64<TKey> NewSet(IFunc2Arg<TKey,TKey,java.lang.Boolean> keyCompare, boolean unique)
keyCompare - The specified comparator.unique - A boolean value indicating if the set
allows duplicates.public boolean Remove(FSet64<TKey> list)
list - The object to remove from the container.public long Size()
public FSet64<TKey> Item(int index)
index - The zero-based index of the element to get.ArgumentOutOfRangeException - Thrown when the
specified index is out of [0, Size - 1] range.public void Clear()
public void SetTemp(boolean value)
Copyright© 2012 Progeneric Systems, Inc. All Rights Reserved.