public final class SideProofStore extends Object
The only instance of this class DEFAULT_INSTANCE
is used
to manage performed side proofs.
Side proofs are added via #disposeOrStore(String, ApplyStrategyInfo)
when they are no longer needed. If the SideProofStore
is enabled (isEnabled()
)
the side Proof
is not disposed; instead it is added via addProof(String, Proof)
and available for a later access until it is removed via removeEntries(Collection)
.
Modifier and Type | Class and Description |
---|---|
static class |
SideProofStore.Entry
An
SideProofStore.Entry of a SideProofStore . |
Modifier and Type | Field and Description |
---|---|
static SideProofStore |
DEFAULT_INSTANCE
The default and only instance of this class.
|
private boolean |
enabled
The enabled state.
|
private List<SideProofStore.Entry> |
entries
All contained
SideProofStore.Entry s. |
private List<ISideProofStoreListener> |
listener
All available
ISideProofStoreListener . |
private PropertyChangeSupport |
pcs
|
static String |
PROP_ENABLED
Property
isEnabled() . |
Modifier | Constructor and Description |
---|---|
private |
SideProofStore()
Forbid other instances.
|
public static final String PROP_ENABLED
isEnabled()
.public static final SideProofStore DEFAULT_INSTANCE
private final List<SideProofStore.Entry> entries
SideProofStore.Entry
s.private final List<ISideProofStoreListener> listener
ISideProofStoreListener
.private boolean enabled
private PropertyChangeSupport pcs
public boolean isEnabled()
SideProofStore
is enabled or not.true
enabled, false
disabled.public void setEnabled(boolean enabled)
enabled
- true
enabled, false
disabled.public void addProof(String description, Proof proof)
Proof
.description
- The description.proof
- The Proof
to add.public void removeEntries(Collection<SideProofStore.Entry> entries)
SideProofStore.Entry
s.entries
- The SideProofStore.Entry
s to remove.public void clearProofs()
SideProofStore.Entry
s.public boolean containsEntry(Proof proof)
SideProofStore.Entry
for the given Proof
exist.proof
- The Proof
to check.true
SideProofStore.Entry
for Proof
exist, false
otherwise.public SideProofStore.Entry getEntry(Proof proof)
SideProofStore.Entry
for the given Proof
.proof
- The Proof
for which the SideProofStore.Entry
is requested.SideProofStore.Entry
with the given Proof
or null
if not available.public boolean containsEntry(SideProofStore.Entry entry)
SideProofStore.Entry
is contained.entry
- The SideProofStore.Entry
to check.true
SideProofStore.Entry
is contained, false
SideProofStore.Entry
is not contained.public int countEntries()
SideProofStore.Entry
s.SideProofStore.Entry
s.public SideProofStore.Entry getEntryAt(int index)
SideProofStore.Entry
at the given index.index
- The index.SideProofStore.Entry
at the given index.public SideProofStore.Entry[] getEntries()
SideProofStore.Entry
s.SideProofStore.Entry
s.public void addProofStoreListener(ISideProofStoreListener l)
ISideProofStoreListener
.l
- The ISideProofStoreListener
to register.public void removeProofStoreListener(ISideProofStoreListener l)
ISideProofStoreListener
.l
- The ISideProofStoreListener
to unregister.public ISideProofStoreListener[] getProofStoreListener()
ISideProofStoreListener
.ISideProofStoreListener
.protected void fireEntriesAdded(SideProofStoreEvent e)
ISideProofStoreListener.entriesAdded(SideProofStoreEvent)
.e
- The event.protected void fireEntriesRemoved(SideProofStoreEvent e)
ISideProofStoreListener.entriesRemoved(SideProofStoreEvent)
.e
- The event.public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The listener to add.public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- The property to observe.listener
- The listener to add.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The listener to remove.public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- The property to no longer observe.listener
- The listener to remove.