// Path: lib/src/main/java/com/yheriatovych/reductor/Reducer.java
// public interface Reducer<State> {
//     /**
//      * Produce new state based on current state and action to dispatch.
//      * <p>
//      * Reducer is responsible to populate initial state if null is passed as 'state' argument
//      * <p>
//      * Note:
//      * This function should be pure. No side effects, no API calls!
//      *
//      * @param state  state to be reduced
//      * @param action minimum representation of change to be performed on state
//      * @return a new state
//      */
//     State reduce(State state, Action action);
// }
// 
// Path: example/src/main/java/com/yheriatovych/reductor/example/model/Note.java
// public class Note {
//     public final int id;
//     public final String note;
//     public final boolean checked;
// 
//     public Note(int id, String note, boolean checked) {
//         this.id = id;
//         this.note = note;
//         this.checked = checked;
//     }
// 
//     @Override
//     public String toString() {
//         return String.format("[%s] %s", checked ? "+" : " ", note);
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         Note note1 = (Note) o;
// 
//         if (id != note1.id) return false;
//         if (checked != note1.checked) return false;
//         return note != null ? note.equals(note1.note) : note1.note == null;
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = id;
//         result = 31 * result + (note != null ? note.hashCode() : 0);
//         result = 31 * result + (checked ? 1 : 0);
//         return result;
//     }
// }


import com.yheriatovych.reductor.Reducer;
import com.yheriatovych.reductor.annotations.AutoReducer;
import com.yheriatovych.reductor.annotations.AutoReducer.Action;
import com.yheriatovych.reductor.example.model.Note;
import org.pcollections.TreePVector;
import java.util.List;
package com.yheriatovych.reductor.example.reductor.notelist;



@AutoReducer
public abstract class NotesListReducer implements Reducer<List<Note>> {

    @AutoReducer.InitialState
    List<Note> initialState() {
        return TreePVector.empty();
    }

    @Action(value = NotesActions.ADD_ACTION,
            from = NotesActions.class)
// Path: lib/src/main/java/com/yheriatovych/reductor/Reducer.java
// public interface Reducer<State> {
//     /**
//      * Produce new state based on current state and action to dispatch.
//      * <p>
//      * Reducer is responsible to populate initial state if null is passed as 'state' argument
//      * <p>
//      * Note:
//      * This function should be pure. No side effects, no API calls!
//      *
//      * @param state  state to be reduced
//      * @param action minimum representation of change to be performed on state
//      * @return a new state
//      */
//     State reduce(State state, Action action);
// }
// 
// Path: example/src/main/java/com/yheriatovych/reductor/example/model/Note.java
// public class Note {
//     public final int id;
//     public final String note;
//     public final boolean checked;
// 
//     public Note(int id, String note, boolean checked) {
//         this.id = id;
//         this.note = note;
//         this.checked = checked;
//     }
// 
//     @Override
//     public String toString() {
//         return String.format("[%s] %s", checked ? "+" : " ", note);
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         Note note1 = (Note) o;
// 
//         if (id != note1.id) return false;
//         if (checked != note1.checked) return false;
//         return note != null ? note.equals(note1.note) : note1.note == null;
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = id;
//         result = 31 * result + (note != null ? note.hashCode() : 0);
//         result = 31 * result + (checked ? 1 : 0);
//         return result;
//     }
// }


// Path: example/src/main/java/com/yheriatovych/reductor/example/reductor/notelist/NotesListReducer.java
import com.yheriatovych.reductor.Reducer;
import com.yheriatovych.reductor.annotations.AutoReducer;
import com.yheriatovych.reductor.annotations.AutoReducer.Action;
import com.yheriatovych.reductor.example.model.Note;
import org.pcollections.TreePVector;
import java.util.List;

package com.yheriatovych.reductor.example.reductor.notelist;



@AutoReducer
public abstract class NotesListReducer implements Reducer<List<Note>> {

    @AutoReducer.InitialState
    List<Note> initialState() {
        return TreePVector.empty();
    }

    @Action(value = NotesActions.ADD_ACTION,
            from = NotesActions.class)
    public List<Note> add(List<Note> state, int id, String content) {