aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java/com/libmailcore/IndexSet.java
blob: ed48fdb1483d860606671cda377a0f1fa47ca634 (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
26
27
28
29
30
31
32
package com.libmailcore;

import java.util.List;

public class IndexSet extends NativeObject {
    public IndexSet() {
        setupNative();
    }
    
    public static native IndexSet indexSet();
    public static native IndexSet indexSetWithRange(Range range);
    public static native IndexSet indexSetWithIndex(long idx);
    
    public native int count();
    public native void addIndex(long idx);
    public native void removeIndex(long idx);
    public native boolean containsIndex(long idx);
    
    public native void addRange(Range range);
    public native void removeRange(Range range);
    public native void intersectsRange(Range range);
    
    public native void addIndexSet(IndexSet indexSet);
    public native void removeIndexSet(IndexSet indexSet);
    public native void intersectsIndexSet(IndexSet indexSet);
    
    public native List<Range> allRanges();
    public native int rangesCount();
    public native void removeAllIndexes();
    
    private native void setupNative();
}