All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetlang.core.MessageBuffer Maven / Gradle / Ivy

Go to download

Jetlang provides a high performance java threading library. It is a complement to the java.util.concurrent package introduced in 1.5 and should be used for message based concurrency similar to event based actors in Scala.

There is a newer version: 0.2.23
Show newest version
package org.jetlang.core;

import java.util.ArrayList;

/**
 * User: mrettig
 * Date: Sep 28, 2009
 */
public class MessageBuffer implements MessageReader {
    private ArrayList events = new ArrayList<>();

    public int size() {
        return events.size();
    }

    public T get(int index) {
        return events.get(index);
    }

    public void add(T r) {
        events.add(r);
    }

    public boolean isEmpty() {
        return events.isEmpty();
    }

    public void clear() {
        events.clear();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy