Class DataBridgeXY<T extends MguiNumber>

java.lang.Object
mgui.interfaces.io.DataBridge<T>
mgui.interfaces.io.DataBridgeXY<T>
Type Parameters:
T -
All Implemented Interfaces:
DataInputStream<T>, DataInputStreamXY<T>, DataOutputStream<T>, DataOutputStreamXY<T>, DataSourceListener
Direct Known Subclasses:
DataBridgeNamedXY

public class DataBridgeXY<T extends MguiNumber>
extends DataBridge<T>
implements DataInputStreamXY<T>, DataOutputStreamXY<T>
Acts as a data bridge for XY data, where X holds a single value and each Y channel has an array of values corresponding to that X.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected java.util.List<T> x  
    protected java.util.List<java.util.List<T>> y  

    Fields inherited from class mgui.interfaces.io.DataBridge

    closed, inputListeners
  • Constructor Summary

    Constructors
    Constructor Description
    DataBridgeXY​(int size)  
    DataBridgeXY​(int size, T initial_value)  
  • Method Summary

    Modifier and Type Method Description
    void dataSourceEmission​(DataSourceEvent event)
    Responds to a signal emission from a data source.
    void dataSourceReset​(DataSourceEvent event)
    Resets this listener in response to a reset of the data source.
    int getChannelCount()
    Returns the number of Y channels in this stream.
    java.util.List<T> getData()
    Returns a sample of the current state of this input stream.
    byte[] getDataAsBytes()
    Returns a sample of the current state of this stream as a byte array.
    java.util.List<T> getXData()
    Returns the X data as a value of type T.
    java.util.List<java.util.List<T>> getYData()
    Returns the Y data for all channels, as a list of type T.
    java.util.List<T> getYData​(int i)
    Returns the Y data for the i'th channel, as type T.
    void setData​(java.util.List<T> data)
    Sets the data for this output stream.
    void setDataAsBytes​(byte[] d)
    Sets the data for this output stream as a byte array.
    void setXData​(java.util.List<T> x)
    Sets the X value for this output stream
    void setYData​(int i, java.util.List<T> data)
    Sets the Y data for the i'th channels of this output stream.
    void setYData​(java.util.List<java.util.List<T>> data)
    Sets the Y data for all channels of this output stream.

    Methods inherited from class mgui.interfaces.io.DataBridge

    addInputStreamListener, close, fireListeners, removeInputStreamListener

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface mgui.interfaces.io.DataInputStream

    addInputStreamListener, close, removeInputStreamListener

    Methods inherited from interface mgui.interfaces.io.DataOutputStream

    close
  • Field Details

    • x

      protected java.util.List<T extends MguiNumber> x
    • y

      protected java.util.List<java.util.List<T extends MguiNumber>> y
  • Constructor Details

    • DataBridgeXY

      public DataBridgeXY​(int size)
    • DataBridgeXY

      public DataBridgeXY​(int size, T initial_value)
  • Method Details