Package net.commoble.jumbofurnace

# Class SnapshotStack<T>

java.lang.Object
net.neoforged.neoforge.transfer.transaction.SnapshotJournal<T>
net.commoble.jumbofurnace.SnapshotStack<T>

public class SnapshotStack<T> extends net.neoforged.neoforge.transfer.transaction.SnapshotJournal<T>

## Method Summary

Modifier and Type
Method
Description
`<R> R`
`apply(Function<T,R> function)`
`<R> R`
`applyAndTakeSnapshot(Function<T,R> function, net.neoforged.neoforge.transfer.transaction.TransactionContext context)`
`protected T`
`createSnapshot()`
`T`
`get()`
`static <T> SnapshotStack<T>`
`of(T initialValue, UnaryOperator<T> copyFunction)`
`protected void`
`revertToSnapshot(T snapshot)`
`void`
`set(T value)`
`void`
`setAndTakeSnapshot(T value, net.neoforged.neoforge.transfer.transaction.TransactionContext context)`

### Methods inherited from class net.neoforged.neoforge.transfer.transaction.SnapshotJournal

`onRootCommit, releaseSnapshot, updateSnapshots`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### of

public static <T> SnapshotStack<T> of(T initialValue, UnaryOperator<T> copyFunction)

### get

public T get()

### set

public void set(T value)

### apply

public <R> R apply(Function<T,R> function)

### setAndTakeSnapshot

public void setAndTakeSnapshot(T value, net.neoforged.neoforge.transfer.transaction.TransactionContext context)

### applyAndTakeSnapshot

public <R> R applyAndTakeSnapshot(Function<T,R> function, net.neoforged.neoforge.transfer.transaction.TransactionContext context)

### createSnapshot

protected T createSnapshot()

Specified by:
  `createSnapshot` in class `net.neoforged.neoforge.transfer.transaction.SnapshotJournal<T>`

### revertToSnapshot

protected void revertToSnapshot(T snapshot)

Specified by:
  `revertToSnapshot` in class `net.neoforged.neoforge.transfer.transaction.SnapshotJournal<T>`