@Test public void testUpdateBoolean() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); new DataOutputStream(out).writeBoolean(true); long expected = getHashAndReset(out); primitiveDataChecksum.updateBoolean(true); Assert.assertEquals(expected, primitiveDataChecksum.getValue()); }
public void updateBoolean(boolean value) { update(value ? 1 : 0); }
PrimitiveDataChecksum implements Checksum { public void updateBoolean(boolean value) { update(value ? 1 : 0); } }
PrimitiveDataChecksum implements Checksum { public void updateBoolean(boolean value) { update(value ? 1 : 0); } PrimitiveDataChecksum(Checksum checksum); }
PrimitiveDataChecksum implements Checksum { public void updateBoolean(boolean value) { update(value ? 1 : 0); } PrimitiveDataChecksum(Checksum checksum); @Override void update(int b); @Override void update(byte[] b, int off, int len); @Override long getValue(); @Override void reset(); void updateUtf8(String string); void updateUtf8(String[] strings); void updateBoolean(boolean value); void updateShort(short number); void updateInt(int number); void updateLong(long number); void updateFloat(float number); void updateDouble(double number); void update(byte[] numbers); void update(short[] numbers); void update(int[] numbers); void update(long[] numbers); void update(float[] numbers); void update(double[] numbers); }
PrimitiveDataChecksum implements Checksum { public void updateBoolean(boolean value) { update(value ? 1 : 0); } PrimitiveDataChecksum(Checksum checksum); @Override void update(int b); @Override void update(byte[] b, int off, int len); @Override long getValue(); @Override void reset(); void updateUtf8(String string); void updateUtf8(String[] strings); void updateBoolean(boolean value); void updateShort(short number); void updateInt(int number); void updateLong(long number); void updateFloat(float number); void updateDouble(double number); void update(byte[] numbers); void update(short[] numbers); void update(int[] numbers); void update(long[] numbers); void update(float[] numbers); void update(double[] numbers);  }