src/main/java/com/stijndepestel/geminio/Replay.java
/**
     * Load and deserialize the events from their persisted state.
     *
     * @return Reference to this instance.
     */
Load and deserialize the events from their persisted state.
@return Reference to this instance.
Load and deserialize the events from their persisted state . @return Reference to this instance .
public Replay<T> load() {
        if (this.currentState != State.CREATED) {
            throw new IllegalStateException(Replay.ERROR_MESSAGE);
        }
        final JSONArray jsonarr = this.loader.get()
                .getJSONArray(JSONNames.JSON_EVENTS);
        jsonarr.forEach(json -> this.loadedEvents
                .add(new Wrapper<>((JSONObject) json, this.deserializer)));
        this.currentState = State.LOADED;
        return this;
    }
public Replay < T > load ( ) { if ( this . currentState != State . CREATED ) { throw new IllegalStateException ( Replay . ERROR_MESSAGE ) ; } final JSONArray jsonarr = this . loader . get ( ) . getJSONArray ( JSONNames . JSON_EVENTS ) ; jsonarr . forEach ( json -> this . loadedEvents . add ( new Wrapper < > ( ( JSONObject ) json , this . deserializer ) ) ) ; this . currentState = State . LOADED ; return this ; }
Load and deserialize the events from their persisted state.
Load and deserialize the events from their persisted state .
// Get the json