use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer14.
@Test
public void ptrbuffer14() {
PtrBuffer pb = make(5, 5);
contains(pb, 2, 4, 6, 8, 10);
PtrBuffer pb2 = make(5, 5);
contains(pb2, 2, 4, 6, 8, 10);
pb.copy(0, pb2, 1, 4);
contains(pb2, 2, 2, 4, 6, 8);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer26.
@Test
public void ptrbuffer26() {
PtrBuffer pb1 = make(2, 5);
contains(pb1, 2, 4);
PtrBuffer pb2 = make(3, 5);
contains(pb2, 2, 4, 6);
pb1.shiftLeft(pb2);
contains(pb1, 2, 4, 2);
contains(pb2, 4, 6);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer04.
@Test
public void ptrbuffer04() {
PtrBuffer pb = make(4, 5);
contains(pb, 2, 4, 6, 8);
pb.shiftDown(0);
contains(pb, 4, 6, 8);
pb.shiftUp(0);
pb.set(0, 1);
contains(pb, 1, 4, 6, 8);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer13.
@Test
public void ptrbuffer13() {
PtrBuffer pb = make(5, 5);
contains(pb, 2, 4, 6, 8, 10);
pb.clear(1, 3);
contains(pb, 2, -1, -1, -1, 10);
}
use of org.apache.jena.tdb.base.buffer.PtrBuffer in project jena by apache.
the class TestPtrBuffer method ptrbuffer20.
@Test
public void ptrbuffer20() {
PtrBuffer pb1 = make(5, 5);
contains(pb1, 2, 4, 6, 8, 10);
PtrBuffer pb2 = make(0, 5);
contains(pb2);
pb1.shiftRight(pb2);
contains(pb1, 2, 4, 6, 8);
contains(pb2, 10);
}
Aggregations