@Test void testGettingReferencesToObjectOutOfRangeThrows() { assertThrows(IllegalArgumentException.class, () -> globalHeap.getObjectReferenceCount(5)); }
public int getObjectReferenceCount(int index) { if (!objects.containsKey(index)) { throw new IllegalArgumentException("Global heap doesn't contain object with index: " + index); } return objects.get(index).referenceCount; }
GlobalHeap { public int getObjectReferenceCount(int index) { if (!objects.containsKey(index)) { throw new IllegalArgumentException("Global heap doesn't contain object with index: " + index); } return objects.get(index).referenceCount; } }
GlobalHeap { public int getObjectReferenceCount(int index) { if (!objects.containsKey(index)) { throw new IllegalArgumentException("Global heap doesn't contain object with index: " + index); } return objects.get(index).referenceCount; } GlobalHeap(HdfFileChannel hdfFc, long address); }
GlobalHeap { public int getObjectReferenceCount(int index) { if (!objects.containsKey(index)) { throw new IllegalArgumentException("Global heap doesn't contain object with index: " + index); } return objects.get(index).referenceCount; } GlobalHeap(HdfFileChannel hdfFc, long address); @Override String toString(); ByteBuffer getObjectData(int index); int getObjectReferenceCount(int index); }
GlobalHeap { public int getObjectReferenceCount(int index) { if (!objects.containsKey(index)) { throw new IllegalArgumentException("Global heap doesn't contain object with index: " + index); } return objects.get(index).referenceCount; } GlobalHeap(HdfFileChannel hdfFc, long address); @Override String toString(); ByteBuffer getObjectData(int index); int getObjectReferenceCount(int index);  }