File: Location.java

package info (click to toggle)
doctorj 5.0.0-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 6,156 kB
  • ctags: 3,454
  • sloc: java: 30,027; xml: 331; makefile: 82; sh: 61
file content (37 lines) | stat: -rw-r--r-- 616 bytes parent folder | download | duplicates (5)
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
27
28
29
30
31
32
33
34
35
36
37
package org.incava.java;

import java.io.*;
import java.util.*;


/**
 * Code location.
 */
public class Location
{
    public int line;
    
    public int column;

    public Location(int line, int column)
    {
        this.line = line;
        this.column = column;
    }

    public String toString()
    {
        return "[line: " + line + ", column: " + column + "]";
    }

    public boolean equals(Object obj)
    {
        return obj instanceof Location && equals((Location)obj);
    }

    public boolean equals(Location other)
    {
        return other.line == line && other.column == column;
    }

}