@Test public void testChunk() { Assert.assertTrue("IllegalArgumentException expected", failOn(null, 0, null) instanceof IllegalArgumentException); Assert.assertTrue( "IllegalArgumentException expected", failOn(GUID.GUID_UNSPECIFIED, 0, null) instanceof IllegalArgumentException); Assert.assertTrue("IllegalArgumentException expected", failOn( GUID.GUID_UNSPECIFIED, 0, BigInteger.TEN.multiply(BigInteger .valueOf(-1))) instanceof IllegalArgumentException); Assert.assertNull("Should have worked fine", failOn(GUID.GUID_UNSPECIFIED, 0, BigInteger.TEN)); Assert.assertNull("Should have worked fine", failOn(GUID.GUID_UNSPECIFIED, 0, BigInteger.ZERO)); }
public Chunk(final GUID headerGuid, final BigInteger chunkLen) { if (headerGuid == null) { throw new IllegalArgumentException("GUID must not be null."); } if (chunkLen == null || chunkLen.compareTo(BigInteger.ZERO) < 0) { throw new IllegalArgumentException("chunkLen must not be null nor negative."); } this.guid = headerGuid; this.chunkLength = chunkLen; }
Chunk { public Chunk(final GUID headerGuid, final BigInteger chunkLen) { if (headerGuid == null) { throw new IllegalArgumentException("GUID must not be null."); } if (chunkLen == null || chunkLen.compareTo(BigInteger.ZERO) < 0) { throw new IllegalArgumentException("chunkLen must not be null nor negative."); } this.guid = headerGuid; this.chunkLength = chunkLen; } }
Chunk { public Chunk(final GUID headerGuid, final BigInteger chunkLen) { if (headerGuid == null) { throw new IllegalArgumentException("GUID must not be null."); } if (chunkLen == null || chunkLen.compareTo(BigInteger.ZERO) < 0) { throw new IllegalArgumentException("chunkLen must not be null nor negative."); } this.guid = headerGuid; this.chunkLength = chunkLen; } Chunk(final GUID headerGuid, final BigInteger chunkLen);  Chunk(final GUID headerGuid, final long pos, final BigInteger chunkLen); }
Chunk { public Chunk(final GUID headerGuid, final BigInteger chunkLen) { if (headerGuid == null) { throw new IllegalArgumentException("GUID must not be null."); } if (chunkLen == null || chunkLen.compareTo(BigInteger.ZERO) < 0) { throw new IllegalArgumentException("chunkLen must not be null nor negative."); } this.guid = headerGuid; this.chunkLength = chunkLen; } Chunk(final GUID headerGuid, final BigInteger chunkLen);  Chunk(final GUID headerGuid, final long pos, final BigInteger chunkLen); @Deprecated long getChunckEnd(); long getChunkEnd(); BigInteger getChunkLength(); GUID getGuid(); long getPosition(); String prettyPrint(final String prefix); void setPosition(final long pos); @Override String toString(); }
Chunk { public Chunk(final GUID headerGuid, final BigInteger chunkLen) { if (headerGuid == null) { throw new IllegalArgumentException("GUID must not be null."); } if (chunkLen == null || chunkLen.compareTo(BigInteger.ZERO) < 0) { throw new IllegalArgumentException("chunkLen must not be null nor negative."); } this.guid = headerGuid; this.chunkLength = chunkLen; } Chunk(final GUID headerGuid, final BigInteger chunkLen);  Chunk(final GUID headerGuid, final long pos, final BigInteger chunkLen); @Deprecated long getChunckEnd(); long getChunkEnd(); BigInteger getChunkLength(); GUID getGuid(); long getPosition(); String prettyPrint(final String prefix); void setPosition(final long pos); @Override String toString();  }