ZenScript main repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LiveList.java 542B

1234567891011121314151617181920212223
  1. package live;
  2. import listeners.ListenerHandle;
  3. public interface LiveList<T> extends AutoCloseable, Iterable<T> {
  4. @Override
  5. public void close();
  6. int getLength();
  7. int indexOf(T value);
  8. T getAt(int index);
  9. ListenerHandle<LiveList.Listener<T>> addListener(LiveList.Listener<T> listener);
  10. public interface Listener<T> {
  11. void onInserted(int index, T value);
  12. void onChanged(int index, T oldValue, T newValue);
  13. void onRemoved(int index, T oldValue);
  14. }
  15. }