1717import java .util .ArrayList ;
1818import java .util .Collection ;
1919import java .util .Collections ;
20+ import java .util .List ;
2021import org .sensorhub .api .common .BigId ;
2122import org .sensorhub .utils .ObjectUtils ;
2223import org .vast .ogc .xlink .IXlinkReference ;
2324import org .vast .util .Asserts ;
24- import com .google .common .collect .ImmutableList ;
2525import net .opengis .swe .v20 .DataBlock ;
2626
2727
@@ -54,11 +54,7 @@ protected CommandResult()
5454 */
5555 public static ICommandResult withDatastream (BigId dataStreamID )
5656 {
57- Asserts .checkNotNull (dataStreamID , BigId .class );
58-
59- var res = new CommandResult ();
60- res .dsIDs = ImmutableList .of (dataStreamID );
61- return res ;
57+ return withDatastreams (List .of (dataStreamID ));
6258 }
6359
6460
@@ -85,11 +81,7 @@ public static ICommandResult withDatastreams(Collection<BigId> dataStreamIDs)
8581 */
8682 public static ICommandResult withObservation (BigId obsID )
8783 {
88- Asserts .checkNotNull (obsID , BigId .class );
89-
90- var res = new CommandResult ();
91- res .obsIDs = ImmutableList .of (obsID );
92- return res ;
84+ return withObservations (List .of (obsID ));
9385 }
9486
9587
@@ -116,11 +108,7 @@ public static ICommandResult withObservations(Collection<BigId> obsIDs)
116108 */
117109 public static ICommandResult withData (DataBlock data )
118110 {
119- Asserts .checkNotNull (data , DataBlock .class );
120-
121- var res = new CommandResult ();
122- res .inlineRecords = ImmutableList .of (data );
123- return res ;
111+ return withData (List .of (data ));
124112 }
125113
126114
0 commit comments