Package org.microproxy.contentviews
Record Class ProtoField
java.lang.Object
java.lang.Record
org.microproxy.contentviews.ProtoField
- Record Components:
number- the field number (1 to 229-1)value- the valuedeclared- the field's declaration in the schema the message was decoded with, ornullfor a field the schema does not know (or that did not match its declared type) and for messages decoded without a schema
One field of a decoded protobuf message, as it appeared on the wire. A repeated field that was
not packed appears once per value.
-
Constructor Summary
ConstructorsConstructorDescriptionProtoField(int number, ProtoValue value) A field without a declaration.ProtoField(int number, ProtoValue value, ProtoSchema.Field declared) Checks the field number and value. -
Method Summary
Modifier and TypeMethodDescriptiondeclared()Returns the value of thedeclaredrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the declared name of the field, ornullwithout a declaration.intnumber()Returns the value of thenumberrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
ProtoField
Checks the field number and value.- Parameters:
number- the field number (1 to 229-1)value- the valuedeclared- the field's declaration, ornull- Throws:
IllegalArgumentException- if the field number is out of range
-
ProtoField
A field without a declaration.- Parameters:
number- the field number (1 to 229-1)value- the value
-
-
Method Details
-
name
Returns the declared name of the field, ornullwithout a declaration.- Returns:
- the declared name of the field, or
nullwithout a declaration
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
number
public int number()Returns the value of thenumberrecord component.- Returns:
- the value of the
numberrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
declared
Returns the value of thedeclaredrecord component.- Returns:
- the value of the
declaredrecord component
-