fix CloseableConsumer class name (#454)

pull/457/head
Brandon Liu 2023-01-23 19:06:57 +08:00 zatwierdzone przez GitHub
rodzic 4ea87224af
commit b97d9d0e79
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
6 zmienionych plików z 12 dodań i 12 usunięć

Wyświetl plik

@ -554,7 +554,7 @@ public class VectorTile {
}
/**
* 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>

Wyświetl plik

@ -9,7 +9,7 @@ import com.onthegomap.planetiler.stats.Stats;
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;
@ -138,7 +138,7 @@ class ExternalMergeSort implements FeatureSort {
}
@Override
public CloseableConusmer<SortableFeature> writerForThread() {
public CloseableConsumer<SortableFeature> writerForThread() {
return new ThreadLocalWriter();
}
@ -396,7 +396,7 @@ class ExternalMergeSort implements FeatureSort {
/** 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;

Wyświetl plik

@ -9,7 +9,7 @@ import com.onthegomap.planetiler.geo.GeometryType;
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;
@ -243,7 +243,7 @@ public final class FeatureGroup implements Iterable<FeatureGroup.TileFeatures>,
}
/** Returns a new feature writer that can be used for a single thread. */
public CloseableConusmer<SortableFeature> writerForThread() {
public CloseableConsumer<SortableFeature> writerForThread() {
return sorter.writerForThread();
}

Wyświetl plik

@ -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;
@ -45,7 +45,7 @@ interface FeatureSort extends Iterable<SortableFeature>, DiskBacked, MemoryEstim
}
@Override
public CloseableConusmer<SortableFeature> writerForThread() {
public CloseableConsumer<SortableFeature> writerForThread() {
return list::add;
}
@ -94,7 +94,7 @@ interface FeatureSort extends Iterable<SortableFeature>, DiskBacked, MemoryEstim
* 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() {

Wyświetl plik

@ -5,7 +5,7 @@ import java.io.IOException;
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 {}

Wyświetl plik

@ -14,7 +14,7 @@ import com.onthegomap.planetiler.geo.GeometryType;
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;
@ -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() {