package org.allmyinfo.daemon;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

import org.eclipse.jdt.annotation.NonNull;

public class Actions implements Iterable<Action> {
	public final @NonNull List<@NonNull Action> list;
	public final long execTime;

	@SuppressWarnings("null")
	public Actions(final @NonNull List<@NonNull Action> list, final long execTime) {
		this.list = Collections.unmodifiableList(new ArrayList<Action>(list));
		this.execTime = execTime;
	}

	@Override
	public Iterator<Action> iterator() {
		return list.iterator();
	}

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