public class VisitedHashSet extends java.lang.Object implements VisitedSet
| Modifier and Type | Field and Description |
|---|---|
static int |
NEV |
| Constructor and Description |
|---|
VisitedHashSet(ReplayAlgorithm algorithm,
int initialCapacity)
Initializes a closed set with the given initial capacity
|
| Modifier and Type | Method and Description |
|---|---|
int |
add(byte[] marking,
int newIndex)
Add a marking to the set of visited markings.
|
int |
capacity()
returns the current capacity of the set, including the non-used slots.
|
void |
clear()
empties the set and restores it to its original state
|
ReplayAlgorithm |
getAlgorithm()
Return the algorithm for which this closedSet is used.
|
long |
getEstimatedMemorySize()
returns the maximum memory use in bytes the queue ever had.
|
java.lang.String |
toString() |
public static final int NEV
public VisitedHashSet(ReplayAlgorithm algorithm, int initialCapacity)
algorithm - initialCapacity - public ReplayAlgorithm getAlgorithm()
VisitedSetgetAlgorithm in interface VisitedSetpublic int add(byte[] marking,
int newIndex)
VisitedSetadd in interface VisitedSetmarking - the byte[] indicating the number of tokens per placepublic java.lang.String toString()
toString in class java.lang.Objectpublic int capacity()
VisitedSetcapacity in interface VisitedSetpublic void clear()
VisitedSetclear in interface VisitedSetpublic long getEstimatedMemorySize()
getEstimatedMemorySize in interface VisitedSet