Tweak test script no issue #
[arvados.git] / src / main / java / org / arvados / client / logic / collection / ManifestStream.java
1 /*
2  * Copyright (C) The Arvados Authors. All rights reserved.
3  *
4  * SPDX-License-Identifier: AGPL-3.0 OR Apache-2.0
5  *
6  */
7
8 package org.arvados.client.logic.collection;
9
10 import org.arvados.client.logic.keep.KeepLocator;
11
12 import java.util.List;
13 import java.util.stream.Collectors;
14 import java.util.stream.Stream;
15
16 public class ManifestStream {
17
18     private String streamName;
19     private List<KeepLocator> keepLocators;
20     private List<FileToken> fileTokens;
21
22     public ManifestStream(String streamName, List<KeepLocator> keepLocators, List<FileToken> fileTokens) {
23         this.streamName = streamName;
24         this.keepLocators = keepLocators;
25         this.fileTokens = fileTokens;
26     }
27
28     @Override
29     public String toString() {
30         return streamName + " " + Stream.concat(keepLocators.stream().map(KeepLocator::toString), fileTokens.stream().map(FileToken::toString))
31                 .collect(Collectors.joining(" "));
32     }
33
34     public String getStreamName() {
35         return this.streamName;
36     }
37
38     public List<KeepLocator> getKeepLocators() {
39         return this.keepLocators;
40     }
41
42     public List<FileToken> getFileTokens() {
43         return this.fileTokens;
44     }
45 }