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()
VisitedSet
getAlgorithm
in interface VisitedSet
public int add(byte[] marking, int newIndex)
VisitedSet
add
in interface VisitedSet
marking
- the byte[] indicating the number of tokens per placepublic java.lang.String toString()
toString
in class java.lang.Object
public int capacity()
VisitedSet
capacity
in interface VisitedSet
public void clear()
VisitedSet
clear
in interface VisitedSet
public long getEstimatedMemorySize()
getEstimatedMemorySize
in interface VisitedSet