Class ProtobufRectangle2d
java.lang.Object
us.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
org.wpilib.math.shape.proto.detail.ProtobufRectangle2d
- All Implemented Interfaces:
Cloneable
public final class ProtobufRectangle2d
extends us.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
implements Cloneable
Protobuf type
ProtobufRectangle2d-
Field Summary
Fields inherited from class us.hebi.quickbuf.ProtoMessage
bitField0_, cachedSize, unknownBytesFieldName -
Method Summary
Modifier and TypeMethodDescriptionclear()optional .wpi.proto.ProtobufPose2d center = 1;optional double xWidth = 2;optional double yWidth = 3;clone()protected intcopyFrom(ProtobufRectangle2d other) booleanoptional .wpi.proto.ProtobufPose2d center = 1;This method returns the internal storage object without modifying any has state.static us.hebi.quickbuf.Descriptors.Descriptorstatic us.hebi.quickbuf.MessageFactory<ProtobufRectangle2d> optional .wpi.proto.ProtobufPose2d center = 1;This method returns the internal storage object and sets the corresponding has state.doubleoptional double xWidth = 2;doubleoptional double yWidth = 3;booleanoptional .wpi.proto.ProtobufPose2d center = 1;booleanoptional double xWidth = 2;booleanoptional double yWidth = 3;booleanisEmpty()mergeFrom(ProtobufRectangle2d other) mergeFrom(us.hebi.quickbuf.JsonSource input) mergeFrom(us.hebi.quickbuf.ProtoSource input) static ProtobufRectangle2dstatic ProtobufRectangle2dparseFrom(byte[] data) static ProtobufRectangle2dparseFrom(us.hebi.quickbuf.JsonSource input) static ProtobufRectangle2dparseFrom(us.hebi.quickbuf.ProtoSource input) setCenter(ProtobufPose2d value) optional .wpi.proto.ProtobufPose2d center = 1;setXWidth(double value) optional double xWidth = 2;setYWidth(double value) optional double yWidth = 3;voidwriteTo(us.hebi.quickbuf.JsonSink output) voidwriteTo(us.hebi.quickbuf.ProtoSink output) Methods inherited from class us.hebi.quickbuf.ProtoMessage
bytesDefaultValue, checkInitialized, getCachedSize, getMissingFields, getMissingFields, getMissingFields, getMissingFields, getSerializedSize, getUnknownBytes, hashCode, isInitialized, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, rethrowFromParent, toByteArray, toByteArray, toByteArray, toString, writeDelimitedTo
-
Method Details
-
newInstance
- Returns:
- a new empty instance of
ProtobufRectangle2d
-
hasXWidth
public boolean hasXWidth()optional double xWidth = 2;- Returns:
- whether the xWidth field is set
-
clearXWidth
-
getXWidth
public double getXWidth()optional double xWidth = 2;- Returns:
- the xWidth
-
setXWidth
optional double xWidth = 2;- Parameters:
value- the xWidth to set- Returns:
- this
-
hasYWidth
public boolean hasYWidth()optional double yWidth = 3;- Returns:
- whether the yWidth field is set
-
clearYWidth
-
getYWidth
public double getYWidth()optional double yWidth = 3;- Returns:
- the yWidth
-
setYWidth
optional double yWidth = 3;- Parameters:
value- the yWidth to set- Returns:
- this
-
hasCenter
public boolean hasCenter()optional .wpi.proto.ProtobufPose2d center = 1;- Returns:
- whether the center field is set
-
clearCenter
optional .wpi.proto.ProtobufPose2d center = 1;- Returns:
- this
-
getCenter
optional .wpi.proto.ProtobufPose2d center = 1;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. UsegetMutableCenter()if you want to modify it.- Returns:
- internal storage object for reading
-
getMutableCenter
optional .wpi.proto.ProtobufPose2d center = 1;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
-
setCenter
optional .wpi.proto.ProtobufPose2d center = 1;- Parameters:
value- the center to set- Returns:
- this
-
copyFrom
- Specified by:
copyFromin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
-
mergeFrom
- Overrides:
mergeFromin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
-
clear
- Specified by:
clearin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
-
clearQuick
- Overrides:
clearQuickin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
-
equals
- Specified by:
equalsin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
-
writeTo
- Specified by:
writeToin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>- Throws:
IOException
-
computeSerializedSize
protected int computeSerializedSize()- Specified by:
computeSerializedSizein classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
-
mergeFrom
- Specified by:
mergeFromin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>- Throws:
IOException
-
writeTo
- Overrides:
writeToin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>- Throws:
IOException
-
mergeFrom
- Overrides:
mergeFromin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>- Throws:
IOException
-
clone
- Specified by:
clonein classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
-
isEmpty
public boolean isEmpty()- Overrides:
isEmptyin classus.hebi.quickbuf.ProtoMessage<ProtobufRectangle2d>
-
parseFrom
public static ProtobufRectangle2d parseFrom(byte[] data) throws us.hebi.quickbuf.InvalidProtocolBufferException - Throws:
us.hebi.quickbuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
- Throws:
IOException
-
getFactory
- Returns:
- factory for creating ProtobufRectangle2d messages
-
getDescriptor
public static us.hebi.quickbuf.Descriptors.Descriptor getDescriptor()- Returns:
- this type's descriptor.
-