com.alexkasko.unsafe.offheapstruct
class OffHeapStructComparator extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
OffHeapStructComparator.OffHeapStructByteArrayAccessor
Struct's accessor implementation for byte array structs
|
private static class |
OffHeapStructComparator.OffHeapStructIndexAccessor
Struct's accessor implementation for off-heap stored structs
|
| Modifier and Type | Field and Description |
|---|---|
private OffHeapStructComparator.OffHeapStructByteArrayAccessor |
baa1 |
private OffHeapStructComparator.OffHeapStructByteArrayAccessor |
baa2 |
private Comparator<OffHeapStructAccessor> |
comp |
private OffHeapStructComparator.OffHeapStructIndexAccessor |
ia1 |
private OffHeapStructComparator.OffHeapStructIndexAccessor |
ia2 |
| Constructor and Description |
|---|
OffHeapStructComparator(OffHeapStructCollection col,
Comparator<OffHeapStructAccessor> comp)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
compare(long index1,
byte[] struct2)
Calls
compare on comparator and return it results |
(package private) boolean |
eq(byte[] struct1,
byte[] struct2)
Equals operation
|
(package private) boolean |
eq(long index1,
byte[] struct2)
Equals operation
|
(package private) boolean |
gt(long index1,
byte[] struct2)
Greater-then operation
|
(package private) boolean |
gt(long index1,
long index2)
Greater-then operation
|
(package private) boolean |
lt(byte[] struct1,
long index2)
Lesser-then operation
|
(package private) boolean |
lt(long index1,
byte[] struct2)
Lesser-then operation
|
String |
toString() |
private final OffHeapStructComparator.OffHeapStructIndexAccessor ia1
private final OffHeapStructComparator.OffHeapStructIndexAccessor ia2
private final OffHeapStructComparator.OffHeapStructByteArrayAccessor baa1
private final OffHeapStructComparator.OffHeapStructByteArrayAccessor baa2
private final Comparator<OffHeapStructAccessor> comp
OffHeapStructComparator(OffHeapStructCollection col, Comparator<OffHeapStructAccessor> comp)
col - collection for index accesscomp - comparatorboolean gt(long index1, long index2)
index1 - collection indexindex2 - collection indexboolean gt(long index1, byte[] struct2)
index1 - collection indexstruct2 - structureboolean lt(long index1, byte[] struct2)
index1 - collection indexstruct2 - structureboolean lt(byte[] struct1, long index2)
struct1 - structureindex2 - collection indexboolean eq(long index1, byte[] struct2)
index1 - collection indexstruct2 - structureboolean eq(byte[] struct1, byte[] struct2)
struct1 - structurestruct2 - structureint compare(long index1, byte[] struct2)
compare on comparator and return it resultsindex1 - collection indexstruct2 - structureCopyright © 2014. All Rights Reserved.