Add AsyncTripReader constructor with single consumer argument
This commit is contained in:
parent
8f8c335e81
commit
39e1f41c0e
@ -46,6 +46,18 @@ public class AsyncUraTripReader implements AutoCloseable {
|
|||||||
private CompletableFuture<Void> future;
|
private CompletableFuture<Void> future;
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize trip reader.
|
||||||
|
*
|
||||||
|
* @param url URL to read trips from.
|
||||||
|
* @param consumer Initial consumer.
|
||||||
|
*/
|
||||||
|
public AsyncUraTripReader(URL url, Consumer<Trip> consumer) {
|
||||||
|
this.url = url;
|
||||||
|
this.consumers = new ArrayList<>();
|
||||||
|
this.consumers.add(consumer);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize trip reader.
|
* Initialize trip reader.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user