Java Code Examples for io.vavr.collection.Vector#ofAll()
The following examples show how to use
io.vavr.collection.Vector#ofAll() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DataColumnCollection.java From java-datatable with Apache License 2.0 | 5 votes |
/** * DataColumnCollection constructor. * Creates a Data Column Collection containing the specified columns. * * @param table The table the column collection belong to. * @param columns The collection of data columns. */ DataColumnCollection(DataTable table, Iterable<IDataColumn> columns) { Guard.notNull(table, "table"); Guard.itemsNotNull(columns, "columns"); this.table = table; this.columns = Vector.ofAll(columns); }
Example 2
Source File: GroupWhileSpec.java From ts-reaktive with MIT License | 5 votes |
private Seq<Seq<Integer>> run(Source<Integer,?> source) { try { List<Seq<Integer>> result = source.runWith(sink, materializer).toCompletableFuture().get(10, TimeUnit.SECONDS); return Vector.ofAll(result); } catch (InterruptedException | ExecutionException | TimeoutException e) { throw new RuntimeException(e); } }
Example 3
Source File: ObjectProtocol.java From ts-reaktive with MIT License | 5 votes |
public ObjectProtocol( List<Protocol<JSONEvent, ?>> protocols, Function<List<?>, T> produce, List<Function1<T, ?>> getters ) { this.read = new ObjectReadProtocol<>(Vector.ofAll(protocols), produce, Vector.empty()); this.write = new ObjectWriteProtocol<>(Vector.ofAll(protocols), getters, Vector.empty()); }
Example 4
Source File: MaterializerWorkers.java From ts-reaktive with MIT License | 4 votes |
/** Returns a new MaterializerWorkers where the given event has been applied (which is, a worker having progressed) */ public MaterializerWorkers applyEvent(MaterializerActorEvent event) { return new MaterializerWorkers(Vector.ofAll(event.getWorkerList()), rollback); }
Example 5
Source File: MultiWriteProtocol.java From ts-reaktive with MIT License | 4 votes |
public MultiWriteProtocol(Iterable<WriteProtocol<CsvEvent,?>> protocols, Iterable<Function1<T,?>> getters) { this.protocols = Vector.ofAll(protocols); this.getters = Vector.ofAll(getters); }
Example 6
Source File: ObjectWriteProtocol.java From ts-reaktive with MIT License | 4 votes |
public ObjectWriteProtocol( List<WriteProtocol<JSONEvent, ?>> protocols, List<Function1<T, ?>> getters ) { this(Vector.ofAll(protocols), getters, Vector.empty()); }
Example 7
Source File: ObjectReadProtocol.java From ts-reaktive with MIT License | 4 votes |
public ObjectReadProtocol( List<ReadProtocol<JSONEvent, ?>> protocols, Function<List<?>, T> produce ) { this(Vector.ofAll(protocols), produce, Vector.empty()); }
Example 8
Source File: Schema.java From paleo with Apache License 2.0 | 4 votes |
private static Vector<Field> safeFields(FieldList fields) { return fields == null ? Vector.empty() : Vector.ofAll(fields); }
Example 9
Source File: VectorTest.java From vavr-jackson with Apache License 2.0 | 4 votes |
@Override protected Seq<?> of(Object... objects) { return Vector.ofAll(Arrays.asList(objects)); }
Example 10
Source File: DataColumn.java From java-datatable with Apache License 2.0 | 2 votes |
/** * DataColumn constructor. * * @param type Stores the type of data stored in this column. * @param columnName The column name. * @param data The data items stored in the column. */ public DataColumn(Class<T> type, String columnName, Iterable<T> data) { this(type, columnName, Vector.ofAll(data)); }
Example 11
Source File: MultiReadProtocol.java From ts-reaktive with MIT License | 2 votes |
/** * Creates a MultiReadProtocol * @param protocols The nested protocols to forward all events to * @param produce Function that is invoked with a list of what the nested protocols have emitted, at the * end of every record. */ public MultiReadProtocol(Iterable<ReadProtocol<CsvEvent,?>> protocols, Function1<List<?>, T> produce) { this.protocols = Vector.ofAll(protocols); this.produce = produce; }