Subversion Repositories public

Rev

Rev 87 | Rev 93 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 87 Rev 89
Line 1... Line 1...
1
/*
1
/*
2
 * Task.java - implementation of tracked task
2
 * Task.java - implementation of tracked task
3
 *
3
 *
4
 * Copyright (c) 2006 Lukas Jelinek, http://www.aiken.cz
4
 * Copyright (c) 2006, 2007, 2008 Lukas Jelinek, http://www.aiken.cz
5
 *
5
 *
6
 * ==========================================================================
6
 * ==========================================================================
7
 *
7
 *
8
 * This program is free software; you can redistribute it and/or modify
8
 * This program is free software; you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License Version 2 as
9
 * it under the terms of the GNU General Public License Version 2 as
Line 54... Line 54...
54
        int id = nextId;
54
        int id = nextId;
55
        nextId++;
55
        nextId++;
56
        return id;
56
        return id;
57
    }
57
    }
58
   
58
   
59
   
-
 
60
   
-
 
61
    /**
59
    /**
62
     * Creates a new instance of Task
60
     * Creates a new instance of Task
63
     */
61
     */
64
    public Task() {
62
    public Task() {
65
        id = getNewId();
63
        id = getNewId();
Line 131... Line 129...
131
    /**
129
    /**
132
     * Converts the instance to the string representation. It contains
130
     * Converts the instance to the string representation. It contains
133
     * the task name and consumption.
131
     * the task name and consumption.
134
     * @return string representation
132
     * @return string representation
135
     */
133
     */
-
 
134
    @Override
136
    public String toString() {
135
    public String toString() {
137
        return name + "(" + Long.toString(consumption) + ")";
136
        return name + "(" + Long.toString(consumption) + ")";
138
    }
137
    }
139
   
138
   
140
    /**
139
    /**