private static StreamDescriptor copyStreamDescriptorWithSequence ( StreamDescriptor streamDescriptor , int sequence ) { List < StreamDescriptor > streamDescriptors = streamDescriptor . getNestedStreams ( ) . stream ( ) . map ( stream -> copyStreamDescriptorWithSequence ( stream , sequence ) ) . collect ( toImmutableList ( ) ) ; return new StreamDescriptor ( streamDescriptor . getStreamName ( ) , streamDescriptor . getStreamId ( ) , streamDescriptor . getFieldName ( ) , streamDescriptor . getStreamType ( ) , streamDescriptor . getOrcDataSource ( ) , streamDescriptors , sequence ) ; }
Creates StreamDescriptor which is a copy of this one with the value of sequence changed to the value passed in . Recursively calls itself on the nested streams .