view src/share/tools/IdealGraphVisualizer/Data/src/at/ssw/visualizer/modelimpl/interval/RangeImpl.java @ 4486:f3cc08cb211d

Imported data model from c1visualizer.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 30 Jan 2012 23:11:38 +0100
parents
children
line wrap: on
line source

package at.ssw.visualizer.modelimpl.interval;

import at.ssw.visualizer.model.interval.Range;

/**
 *
 * @author Christian Wimmer
 */
public class RangeImpl implements Range, Comparable<RangeImpl> {
    private int from;
    private int to;

    public RangeImpl(int from, int to) {
        this.from = from;
        this.to = to;
    }


    public int getFrom() {
        return from;
    }

    public int getTo() {
        return to;
    }


    public int compareTo(RangeImpl other) {
        return getFrom() - other.getFrom();
    }

    @Override
    public String toString() {
        return "[" + from + ", " + to + "]";
    }
}