// Path: src/main/java/com/kasirgalabs/etumulator/util/BaseDispatcher.java
// public class BaseDispatcher implements Dispatcher {
//     private final List<Observer> observers;
// 
//     public BaseDispatcher() {
//         observers = new ArrayList<>(10);
//     }
// 
//     @Override
//     public void addObserver(Observer observer) {
//         observers.add(observer);
//     }
// 
//     @Override
//     public void notifyObservers(Class<?> clazz, Object arg) {
//         for(int i = 0; i < observers.size(); i++) {
//             observers.get(i).update(clazz, arg);
//         }
//     }
// 
//     @Override
//     public void notifyObservers(Class<?> clazz) {
//         notifyObservers(clazz, null);
//     }
// }
// 
// Path: src/main/java/com/kasirgalabs/etumulator/util/Dispatcher.java
// public interface Dispatcher {
//     void addObserver(Observer observer);
// 
//     void notifyObservers(Class<?> clazz, Object arg);
// 
//     void notifyObservers(Class<?> clazz);
// }
// 
// Path: src/main/java/com/kasirgalabs/etumulator/util/Observable.java
// public interface Observable {
//     void addObserver(Observer observer);
// }
// 
// Path: src/main/java/com/kasirgalabs/etumulator/util/Observer.java
// public interface Observer {
//     void update(Class<?> clazz, Object arg);
// }


import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.kasirgalabs.etumulator.util.BaseDispatcher;
import com.kasirgalabs.etumulator.util.Dispatcher;
import com.kasirgalabs.etumulator.util.Observable;
import com.kasirgalabs.etumulator.util.Observer;
import java.util.LinkedList;
package com.kasirgalabs.etumulator.processor;


@Singleton
public class Stack implements Observable {
    private final LinkedList<Integer> list = new LinkedList<>();
    private final Dispatcher dispatcher;

    public Stack() {
        this.dispatcher = new BaseDispatcher();
    }

    @Inject
// Path: src/main/java/com/kasirgalabs/etumulator/util/BaseDispatcher.java
// public class BaseDispatcher implements Dispatcher {
//     private final List<Observer> observers;
// 
//     public BaseDispatcher() {
//         observers = new ArrayList<>(10);
//     }
// 
//     @Override
//     public void addObserver(Observer observer) {
//         observers.add(observer);
//     }
// 
//     @Override
//     public void notifyObservers(Class<?> clazz, Object arg) {
//         for(int i = 0; i < observers.size(); i++) {
//             observers.get(i).update(clazz, arg);
//         }
//     }
// 
//     @Override
//     public void notifyObservers(Class<?> clazz) {
//         notifyObservers(clazz, null);
//     }
// }
// 
// Path: src/main/java/com/kasirgalabs/etumulator/util/Dispatcher.java
// public interface Dispatcher {
//     void addObserver(Observer observer);
// 
//     void notifyObservers(Class<?> clazz, Object arg);
// 
//     void notifyObservers(Class<?> clazz);
// }
// 
// Path: src/main/java/com/kasirgalabs/etumulator/util/Observable.java
// public interface Observable {
//     void addObserver(Observer observer);
// }
// 
// Path: src/main/java/com/kasirgalabs/etumulator/util/Observer.java
// public interface Observer {
//     void update(Class<?> clazz, Object arg);
// }


// Path: src/main/java/com/kasirgalabs/etumulator/processor/Stack.java
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.kasirgalabs.etumulator.util.BaseDispatcher;
import com.kasirgalabs.etumulator.util.Dispatcher;
import com.kasirgalabs.etumulator.util.Observable;
import com.kasirgalabs.etumulator.util.Observer;
import java.util.LinkedList;

package com.kasirgalabs.etumulator.processor;


@Singleton
public class Stack implements Observable {
    private final LinkedList<Integer> list = new LinkedList<>();
    private final Dispatcher dispatcher;

    public Stack() {
        this.dispatcher = new BaseDispatcher();
    }

    @Inject
    public Stack(Dispatcher dispatcher) {