Skip to content

Commit

Permalink
fix CloseableConsumer class name (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon authored Jan 23, 2023
1 parent 4ea8722 commit b97d9d0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ private enum Command {
}

/**
* A vector tile encoded as a list of commands according to the
* A vector geometry encoded as a list of commands according to the
* <a href="https://github.com/mapbox/vector-tile-spec/tree/master/2.1#43-geometry-encoding">vector tile
* specification</a>.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.onthegomap.planetiler.stats.Timer;
import com.onthegomap.planetiler.util.BinPack;
import com.onthegomap.planetiler.util.ByteBufferUtil;
import com.onthegomap.planetiler.util.CloseableConusmer;
import com.onthegomap.planetiler.util.CloseableConsumer;
import com.onthegomap.planetiler.util.FileUtils;
import com.onthegomap.planetiler.worker.WorkerPipeline;
import java.io.BufferedInputStream;
Expand Down Expand Up @@ -138,7 +138,7 @@ private static <T> T time(AtomicLong total, Supplier<T> func) {
}

@Override
public CloseableConusmer<SortableFeature> writerForThread() {
public CloseableConsumer<SortableFeature> writerForThread() {
return new ThreadLocalWriter();
}

Expand Down Expand Up @@ -396,7 +396,7 @@ public final SortableFeature next() {

/** Writer that a single thread can use to write features independent of writers used in other threads. */
@NotThreadSafe
private class ThreadLocalWriter implements CloseableConusmer<SortableFeature> {
private class ThreadLocalWriter implements CloseableConsumer<SortableFeature> {

private Chunk currentChunk;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.onthegomap.planetiler.geo.TileCoord;
import com.onthegomap.planetiler.render.RenderedFeature;
import com.onthegomap.planetiler.stats.Stats;
import com.onthegomap.planetiler.util.CloseableConusmer;
import com.onthegomap.planetiler.util.CloseableConsumer;
import com.onthegomap.planetiler.util.CommonStringEncoder;
import com.onthegomap.planetiler.util.DiskBacked;
import com.onthegomap.planetiler.util.LayerStats;
Expand Down Expand Up @@ -243,7 +243,7 @@ private byte[] encodeValue(VectorTile.Feature vectorTileFeature, RenderedFeature
}

/** Returns a new feature writer that can be used for a single thread. */
public CloseableConusmer<SortableFeature> writerForThread() {
public CloseableConsumer<SortableFeature> writerForThread() {
return sorter.writerForThread();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.onthegomap.planetiler.collection;

import com.onthegomap.planetiler.stats.Stats;
import com.onthegomap.planetiler.util.CloseableConusmer;
import com.onthegomap.planetiler.util.CloseableConsumer;
import com.onthegomap.planetiler.util.DiskBacked;
import com.onthegomap.planetiler.util.MemoryEstimator;
import com.onthegomap.planetiler.worker.WeightedHandoffQueue;
Expand Down Expand Up @@ -45,7 +45,7 @@ public long numFeaturesWritten() {
}

@Override
public CloseableConusmer<SortableFeature> writerForThread() {
public CloseableConsumer<SortableFeature> writerForThread() {
return list::add;
}

Expand Down Expand Up @@ -94,7 +94,7 @@ default List<SortableFeature> toList() {
* Returns a new writer that can be used to write features from a single thread independent of writers used from other
* threads.
*/
CloseableConusmer<SortableFeature> writerForThread();
CloseableConsumer<SortableFeature> writerForThread();

@Override
default Iterator<SortableFeature> iterator() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.function.Consumer;

@FunctionalInterface
public interface CloseableConusmer<T> extends Consumer<T>, Closeable {
public interface CloseableConsumer<T> extends Consumer<T>, Closeable {

@Override
default void close() throws IOException {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import com.onthegomap.planetiler.geo.TileCoord;
import com.onthegomap.planetiler.render.RenderedFeature;
import com.onthegomap.planetiler.stats.Stats;
import com.onthegomap.planetiler.util.CloseableConusmer;
import com.onthegomap.planetiler.util.CloseableConsumer;
import com.onthegomap.planetiler.util.Gzip;
import com.onthegomap.planetiler.writer.TileArchiveWriter;
import java.io.IOException;
Expand All @@ -40,7 +40,7 @@ class FeatureGroupTest {

private final FeatureSort sorter = FeatureSort.newInMemory();
private FeatureGroup features = new FeatureGroup(sorter, new Profile.NullProfile(), Stats.inMemory());
private CloseableConusmer<SortableFeature> featureWriter = features.writerForThread();
private CloseableConsumer<SortableFeature> featureWriter = features.writerForThread();

@Test
void testEmpty() {
Expand Down

0 comments on commit b97d9d0

Please sign in to comment.