~tapaal-contributor/tapaal/disappearing-tokens-1940098

« back to all changes in this revision

Viewing changes to src/dk/aau/cs/model/tapn/Bound.java

  • Committer: Kenneth Yrke Jørgensen
  • Date: 2011-04-12 09:50:16 UTC
  • mfrom: (329.1.188 tapaal-1.5)
  • Revision ID: mail@yrke.dk-20110412095016-e4hqdgab5596ja09
Merged with branch addning support for new 1.5 features

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package dk.aau.cs.model.tapn;
 
2
 
 
3
public interface Bound {
 
4
        int value();
 
5
 
 
6
        Bound copy();
 
7
        boolean equals(Object other);
 
8
        int hashCode();
 
9
        
 
10
        public static Bound Infinity = new InfBound();
 
11
 
 
12
        public class InfBound implements Bound {
 
13
                public int value() {
 
14
                        return -1;
 
15
                }
 
16
 
 
17
                @Override
 
18
                public String toString() {
 
19
                        return "inf";
 
20
                }
 
21
 
 
22
                @Override
 
23
                public int hashCode() {
 
24
                        return 0;
 
25
                }
 
26
 
 
27
                @Override
 
28
                public boolean equals(Object arg0) {
 
29
                        return arg0 instanceof InfBound;
 
30
                }
 
31
 
 
32
                public Bound copy() {
 
33
                        return new InfBound();
 
34
                }
 
35
 
 
36
        }
 
37
}