summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoItem.java
blob: 078713c8073848ca67db080aeb5b35ba52a79c8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package org.madore.damlengine;

public abstract class TodoItem {

    protected TodoDeque ownerDeque;
    protected final Context ctx;
    protected final TodoItem caller;

    public TodoItem(Context ctx, TodoItem caller) {
	this.ctx = ctx;
	this.caller = caller;
    }

    public final TodoDeque getOwnerDeque() {
	return this.ownerDeque;
    }

    public final void setOwnerDeque(TodoDeque ownerDeque) {
	if ( this.ownerDeque != null )
	    throw new IllegalStateException("item already owned by a deque");
	this.ownerDeque = ownerDeque;
    }

    public abstract void handle();

}