Interface VStream

All Superinterfaces:
Supplier<Vector2D>
All Known Implementing Classes:
FilteredVStream, PollingVStream

public interface VStream extends Supplier<Vector2D>
A VStream is similar to an IStream, but instead of a stream of doubles, it represents a stream of Vector2Ds.
  • Method Details

    • create

      static VStream create(VStream stream)
    • create

      static VStream create(AStream stream)
    • create

      static VStream create(IStream x, IStream y)
    • get

      Vector2D get()
      Specified by:
      get in interface Supplier<Vector2D>
      Returns:
      next value in the stream
    • filtered

      default FilteredVStream filtered(VFilter... filters)
      Create a new FilteredVStream from the current stream
      Parameters:
      filters - the filters you want to apply to the VStream
      Returns:
      The FilteredVStream
    • polling

      default PollingVStream polling(double dt)
      Create a new PollingVStream from the current stream
      Parameters:
      dt - the time inbetween each poll of the VStream
      Returns:
      The PollingVStream
    • add

      default VStream add(VStream other)
      Combine two VStreams by adding their results together
      Parameters:
      other - other VStream to and with this one
      Returns:
      the resulting VStream after the and
    • sub

      default VStream sub(VStream other)
      Combine two VStreams by subtracting their results together
      Parameters:
      other - other VStream to or with this one
      Returns:
      the resulting VStream after the or
    • dot

      default IStream dot(VStream other)
      Combine two VStreams into an IStream by dot producting them together
      Parameters:
      other - other VStream to dot with this one
      Returns:
      the IStream with the dot product