aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java/com/libmailcore/Range.java
blob: 3d7cb7b61ce5d96e554160fbf8fa8bb6758ca73d (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
package com.libmailcore;

public class Range {
    public long location;
    public long length;

    static public long RangeMax = 1 >> 63 - 1;

    public Range() {}
    public Range(long aLocation, long aLength)
    {
        location = aLocation;
        length = aLength;
    }
    
    public native IndexSet removeRange(Range otherRange);
    public native IndexSet union(Range otherRange);
    public native Range intersection(Range otherRange);
    public native boolean hasIntersection(Range otherRange);
    public native long leftBound();
    public native long rightBound();
    public native String toString();
    
    public static native Range rangeWithString(String rangeString);
}