Class ProtobufMatrix

java.lang.Object
us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
org.wpilib.math.proto.ProtobufMatrix
All Implemented Interfaces:
Cloneable

public final class ProtobufMatrix extends us.hebi.quickbuf.ProtoMessage<ProtobufMatrix> implements Cloneable
Protobuf type ProtobufMatrix
  • Method Details

    • newInstance

      public static ProtobufMatrix newInstance()
      Returns:
      a new empty instance of ProtobufMatrix
    • hasNumRows

      public boolean hasNumRows()
      optional uint32 num_rows = 1;
      Returns:
      whether the numRows field is set
    • clearNumRows

      optional uint32 num_rows = 1;
      Returns:
      this
    • getNumRows

      public int getNumRows()
      optional uint32 num_rows = 1;
      Returns:
      the numRows
    • setNumRows

      public ProtobufMatrix setNumRows(int value)
      optional uint32 num_rows = 1;
      Parameters:
      value - the numRows to set
      Returns:
      this
    • hasNumCols

      public boolean hasNumCols()
      optional uint32 num_cols = 2;
      Returns:
      whether the numCols field is set
    • clearNumCols

      optional uint32 num_cols = 2;
      Returns:
      this
    • getNumCols

      public int getNumCols()
      optional uint32 num_cols = 2;
      Returns:
      the numCols
    • setNumCols

      public ProtobufMatrix setNumCols(int value)
      optional uint32 num_cols = 2;
      Parameters:
      value - the numCols to set
      Returns:
      this
    • hasData

      public boolean hasData()
      repeated double data = 3;
      Returns:
      whether the data field is set
    • clearData

      repeated double data = 3;
      Returns:
      this
    • getData

      public us.hebi.quickbuf.RepeatedDouble getData()
      repeated double data = 3; This method returns the internal storage object without modifying any has state. The returned object should not be modified and be treated as read-only. Use getMutableData() if you want to modify it.
      Returns:
      internal storage object for reading
    • getMutableData

      public us.hebi.quickbuf.RepeatedDouble getMutableData()
      repeated double data = 3; This method returns the internal storage object and sets the corresponding has state. The returned object will become part of this message and its contents may be modified as long as the has state is not cleared.
      Returns:
      internal storage object for modifications
    • addData

      public ProtobufMatrix addData(double value)
      repeated double data = 3;
      Parameters:
      value - the data to add
      Returns:
      this
    • addAllData

      public ProtobufMatrix addAllData(double... values)
      repeated double data = 3;
      Parameters:
      values - the data to add
      Returns:
      this
    • copyFrom

      Specified by:
      copyFrom in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
    • mergeFrom

      Overrides:
      mergeFrom in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
    • clear

      Specified by:
      clear in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
    • clearQuick

      Overrides:
      clearQuick in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
    • writeTo

      public void writeTo(us.hebi.quickbuf.ProtoSink output) throws IOException
      Specified by:
      writeTo in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
      Throws:
      IOException
    • computeSerializedSize

      protected int computeSerializedSize()
      Specified by:
      computeSerializedSize in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
    • mergeFrom

      public ProtobufMatrix mergeFrom(us.hebi.quickbuf.ProtoSource input) throws IOException
      Specified by:
      mergeFrom in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
      Throws:
      IOException
    • writeTo

      public void writeTo(us.hebi.quickbuf.JsonSink output) throws IOException
      Overrides:
      writeTo in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
      Throws:
      IOException
    • mergeFrom

      public ProtobufMatrix mergeFrom(us.hebi.quickbuf.JsonSource input) throws IOException
      Overrides:
      mergeFrom in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
      Throws:
      IOException
    • clone

      Specified by:
      clone in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
    • isEmpty

      public boolean isEmpty()
      Overrides:
      isEmpty in class us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
    • parseFrom

      public static ProtobufMatrix parseFrom(byte[] data) throws us.hebi.quickbuf.InvalidProtocolBufferException
      Throws:
      us.hebi.quickbuf.InvalidProtocolBufferException
    • parseFrom

      public static ProtobufMatrix parseFrom(us.hebi.quickbuf.ProtoSource input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ProtobufMatrix parseFrom(us.hebi.quickbuf.JsonSource input) throws IOException
      Throws:
      IOException
    • getFactory

      public static us.hebi.quickbuf.MessageFactory<ProtobufMatrix> getFactory()
      Returns:
      factory for creating ProtobufMatrix messages
    • getDescriptor

      public static us.hebi.quickbuf.Descriptors.Descriptor getDescriptor()
      Returns:
      this type's descriptor.