use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer22.
@Test
public void ptrbuffer22() {
PtrBuffer pb1 = make(3, 5);
contains(pb1, 2, 4, 6);
PtrBuffer pb2 = make(2, 5);
contains(pb2, 2, 4);
pb1.shiftRight(pb2);
contains(pb1, 2, 4);
contains(pb2, 6, 2, 4);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer28.
@Test
public void ptrbuffer28() {
PtrBuffer pb1 = make(0, 5);
PtrBuffer pb2 = make(2, 4);
pb1.copyToTop(pb2);
contains(pb2, 2, 4);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer03.
// No BinarySearch test
// Shift at LHS
@Test
public void ptrbuffer03() {
PtrBuffer pb = make(4, 5);
contains(pb, 2, 4, 6, 8);
pb.shiftUp(0);
pb.set(0, 99);
contains(pb, 99, 2, 4, 6, 8);
pb.shiftDown(0);
contains(pb, 2, 4, 6, 8);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer12.
// Copy, duplicate, clear
@Test
public void ptrbuffer12() {
PtrBuffer pb = make(5, 5);
contains(pb, 2, 4, 6, 8, 10);
PtrBuffer pb2 = pb.duplicate();
pb2.set(1, 99);
contains(pb, 2, 4, 6, 8, 10);
contains(pb2, 2, 99, 6, 8, 10);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer24.
@Test
public void ptrbuffer24() {
PtrBuffer pb1 = make(0, 5);
contains(pb1);
PtrBuffer pb2 = make(5, 5);
contains(pb2, 2, 4, 6, 8, 10);
pb1.shiftLeft(pb2);
contains(pb1, 2);
contains(pb2, 4, 6, 8, 10);
}
Aggregations