@Test void givenValuesAreEqualItShouldReturnTrue() { ByteComparisonStep<TestData> hashStep = new ByteComparisonStep<>(TestData::getValue); boolean result = hashStep.isEqual(new TestData((byte) 5), new TestData((byte) 5)); assertThat(result) .isTrue(); }
@Override public boolean isEqual(T object1, T object2) { return valueExtractor.applyAsByte(object1) == valueExtractor.applyAsByte(object2); }
ByteComparisonStep implements ComparisonStep<T> { @Override public boolean isEqual(T object1, T object2) { return valueExtractor.applyAsByte(object1) == valueExtractor.applyAsByte(object2); } }
ByteComparisonStep implements ComparisonStep<T> { @Override public boolean isEqual(T object1, T object2) { return valueExtractor.applyAsByte(object1) == valueExtractor.applyAsByte(object2); } ByteComparisonStep(ToByteFunction<? super T> valueExtractor); }
ByteComparisonStep implements ComparisonStep<T> { @Override public boolean isEqual(T object1, T object2) { return valueExtractor.applyAsByte(object1) == valueExtractor.applyAsByte(object2); } ByteComparisonStep(ToByteFunction<? super T> valueExtractor); @Override boolean isEqual(T object1, T object2); }
ByteComparisonStep implements ComparisonStep<T> { @Override public boolean isEqual(T object1, T object2) { return valueExtractor.applyAsByte(object1) == valueExtractor.applyAsByte(object2); } ByteComparisonStep(ToByteFunction<? super T> valueExtractor); @Override boolean isEqual(T object1, T object2);  }