Go to the documentation of this file.
19package org.sleuthkit.autopsy.coreutils;
21import java.util.Objects;
22import javafx.beans.property.ReadOnlyBooleanProperty;
23import javafx.beans.property.ReadOnlyBooleanWrapper;
24import javafx.beans.property.ReadOnlyObjectProperty;
25import javafx.beans.property.ReadOnlyObjectWrapper;
26import javafx.beans.property.SimpleListProperty;
27import javafx.collections.FXCollections;
28import javax.annotation.concurrent.GuardedBy;
29import javax.annotation.concurrent.ThreadSafe;
54 private final ReadOnlyObjectWrapper<T>
currentState = new ReadOnlyObjectWrapper<>();
58 private final ReadOnlyBooleanWrapper
canAdvance = new ReadOnlyBooleanWrapper();
62 private final ReadOnlyBooleanWrapper
canRetreat = new ReadOnlyBooleanWrapper();
98 synchronized public void reset(T newState) {
113 if (peek !=
null && peek.equals(
currentState.get()) ==
false) {
130 if (pop !=
null && pop.equals(
currentState.get()) ==
false) {
134 }
else if (pop !=
null && pop.equals(
currentState.get())) {
149 synchronized public void advance(T newState)
throws IllegalArgumentException {
150 if (newState !=
null && Objects.equals(
currentState.get(), newState) ==
false) {
179 super(FXCollections.<T>synchronizedObservableList(FXCollections.<T>observableArrayList()));
183 synchronized (
this) {
189 synchronized (
this) {
199 synchronized (
this) {
final ReadOnlyBooleanWrapper canAdvance
synchronized T getCurrentState()
synchronized void reset(T newState)
final ObservableStack< T > forwardStack
synchronized boolean canRetreat()
final ReadOnlyBooleanWrapper canRetreat
synchronized boolean canAdvance()
synchronized ReadOnlyBooleanProperty getCanAdvance()
synchronized void clear()
final ReadOnlyObjectWrapper< T > currentState
synchronized ReadOnlyObjectProperty< T > currentState()
synchronized ReadOnlyBooleanProperty getCanRetreat()
final ObservableStack< T > historyStack
synchronized void advance(T newState)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.