diff --git a/src/main/java/org/apache/datasketches/theta/Union.java b/src/main/java/org/apache/datasketches/theta/Union.java index 96ea6d273..7a2ff9c5b 100644 --- a/src/main/java/org/apache/datasketches/theta/Union.java +++ b/src/main/java/org/apache/datasketches/theta/Union.java @@ -19,12 +19,12 @@ package org.apache.datasketches.theta; +import java.nio.ByteBuffer; + import org.apache.datasketches.common.Family; import org.apache.datasketches.memory.Memory; import org.apache.datasketches.memory.WritableMemory; -import java.nio.ByteBuffer; - /** * Compute the union of two or more theta sketches. * A new instance represents an empty set. diff --git a/src/main/java/org/apache/datasketches/theta/UnionImpl.java b/src/main/java/org/apache/datasketches/theta/UnionImpl.java index 8516ec011..3ea5ca557 100644 --- a/src/main/java/org/apache/datasketches/theta/UnionImpl.java +++ b/src/main/java/org/apache/datasketches/theta/UnionImpl.java @@ -38,6 +38,8 @@ import static org.apache.datasketches.theta.SingleItemSketch.otherCheckForSingleItem; import static org.apache.datasketches.thetacommon.QuickSelect.selectExcludingZeros; +import java.nio.ByteBuffer; + import org.apache.datasketches.common.Family; import org.apache.datasketches.common.ResizeFactor; import org.apache.datasketches.common.SketchesArgumentException; @@ -47,8 +49,6 @@ import org.apache.datasketches.thetacommon.HashOperations; import org.apache.datasketches.thetacommon.ThetaUtil; -import java.nio.ByteBuffer; - /** * Shared code for the HeapUnion and DirectUnion implementations. * @@ -483,7 +483,7 @@ public void update(final byte[] data) { } @Override - public void update(ByteBuffer data) { + public void update(final ByteBuffer data) { gadget_.update(data); } diff --git a/src/main/java/org/apache/datasketches/theta/UpdateSketch.java b/src/main/java/org/apache/datasketches/theta/UpdateSketch.java index 02fb599d6..882c5e2e9 100644 --- a/src/main/java/org/apache/datasketches/theta/UpdateSketch.java +++ b/src/main/java/org/apache/datasketches/theta/UpdateSketch.java @@ -284,7 +284,7 @@ public UpdateReturnState update(final byte[] data) { * @return * See Update Return State */ - public UpdateReturnState update(ByteBuffer buffer) { + public UpdateReturnState update(final ByteBuffer buffer) { if (buffer == null || buffer.hasRemaining() == false) { return RejectedNullOrEmpty; } diff --git a/src/main/java/org/apache/datasketches/tuple/UpdatableSketch.java b/src/main/java/org/apache/datasketches/tuple/UpdatableSketch.java index 6a386661c..36743618b 100644 --- a/src/main/java/org/apache/datasketches/tuple/UpdatableSketch.java +++ b/src/main/java/org/apache/datasketches/tuple/UpdatableSketch.java @@ -19,12 +19,12 @@ package org.apache.datasketches.tuple; +import java.nio.ByteBuffer; + import org.apache.datasketches.hash.MurmurHash3; import org.apache.datasketches.memory.Memory; import org.apache.datasketches.thetacommon.ThetaUtil; -import java.nio.ByteBuffer; - /** * An extension of QuickSelectSketch<S>, which can be updated with many types of keys. * Summary objects are created using a user-defined SummaryFactory class, diff --git a/src/main/java/org/apache/datasketches/tuple/arrayofdoubles/ArrayOfDoublesUpdatableSketch.java b/src/main/java/org/apache/datasketches/tuple/arrayofdoubles/ArrayOfDoublesUpdatableSketch.java index 4febb1172..cd3c1d2e7 100644 --- a/src/main/java/org/apache/datasketches/tuple/arrayofdoubles/ArrayOfDoublesUpdatableSketch.java +++ b/src/main/java/org/apache/datasketches/tuple/arrayofdoubles/ArrayOfDoublesUpdatableSketch.java @@ -19,6 +19,8 @@ package org.apache.datasketches.tuple.arrayofdoubles; +import java.nio.ByteBuffer; + import org.apache.datasketches.common.ResizeFactor; import org.apache.datasketches.hash.MurmurHash3; import org.apache.datasketches.memory.Memory; @@ -26,8 +28,6 @@ import org.apache.datasketches.thetacommon.ThetaUtil; import org.apache.datasketches.tuple.Util; -import java.nio.ByteBuffer; - /** * The top level for updatable tuple sketches of type ArrayOfDoubles. */ diff --git a/src/test/java/org/apache/datasketches/theta/UpdateSketchTest.java b/src/test/java/org/apache/datasketches/theta/UpdateSketchTest.java index 331d6e222..76f4707aa 100644 --- a/src/test/java/org/apache/datasketches/theta/UpdateSketchTest.java +++ b/src/test/java/org/apache/datasketches/theta/UpdateSketchTest.java @@ -30,19 +30,17 @@ import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; +import java.nio.ByteBuffer; + import org.apache.datasketches.common.Family; import org.apache.datasketches.common.ResizeFactor; import org.apache.datasketches.common.SketchesArgumentException; import org.apache.datasketches.memory.DefaultMemoryRequestServer; -import org.apache.datasketches.memory.Memory; import org.apache.datasketches.memory.MemoryRequestServer; import org.apache.datasketches.memory.WritableMemory; import org.apache.datasketches.thetacommon.ThetaUtil; import org.testng.annotations.Test; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - /** * @author Lee Rhodes */ diff --git a/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleTest.java b/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleTest.java index a853b6da3..a1cfc1a7d 100644 --- a/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleTest.java +++ b/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleTest.java @@ -21,21 +21,20 @@ import static org.testng.Assert.assertEquals; +import java.nio.ByteBuffer; + import org.apache.datasketches.common.ResizeFactor; import org.apache.datasketches.common.SketchesArgumentException; import org.apache.datasketches.memory.Memory; import org.apache.datasketches.tuple.Sketch; -import org.apache.datasketches.tuple.TupleSketchIterator; import org.apache.datasketches.tuple.Sketches; +import org.apache.datasketches.tuple.TupleSketchIterator; import org.apache.datasketches.tuple.UpdatableSketch; import org.apache.datasketches.tuple.UpdatableSketchBuilder; import org.apache.datasketches.tuple.adouble.DoubleSummary.Mode; import org.testng.Assert; import org.testng.annotations.Test; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - public class AdoubleTest { private final DoubleSummary.Mode mode = Mode.Sum; diff --git a/src/test/java/org/apache/datasketches/tuple/arrayofdoubles/DirectArrayOfDoublesQuickSelectSketchTest.java b/src/test/java/org/apache/datasketches/tuple/arrayofdoubles/DirectArrayOfDoublesQuickSelectSketchTest.java index dfb0c1fda..a8e066f4d 100644 --- a/src/test/java/org/apache/datasketches/tuple/arrayofdoubles/DirectArrayOfDoublesQuickSelectSketchTest.java +++ b/src/test/java/org/apache/datasketches/tuple/arrayofdoubles/DirectArrayOfDoublesQuickSelectSketchTest.java @@ -19,16 +19,14 @@ package org.apache.datasketches.tuple.arrayofdoubles; +import java.nio.ByteBuffer; + import org.apache.datasketches.common.ResizeFactor; import org.apache.datasketches.common.SketchesArgumentException; -import org.apache.datasketches.memory.Memory; import org.apache.datasketches.memory.WritableMemory; import org.testng.Assert; import org.testng.annotations.Test; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - public class DirectArrayOfDoublesQuickSelectSketchTest { @Test public void isEmpty() {