Package org.microproxy.contentviews
Record Class ProtoSchema.Field
java.lang.Object
java.lang.Record
org.microproxy.contentviews.ProtoSchema.Field
- Record Components:
name- the field's namenumber- the field numbertype- the declared typerepeated- whether the field is repeated (or a map)typeName- the full name of the message or enum type (without a leading dot) forProtoSchema.Type.MESSAGE,ProtoSchema.Type.GROUPandProtoSchema.Type.ENUM; otherwisenullpacked- whether repeated values are encoded packed
- Enclosing class:
ProtoSchema
public static record ProtoSchema.Field(String name, int number, ProtoSchema.Type type, boolean repeated, String typeName, boolean packed)
extends Record
A field of a message type.
-
Constructor Summary
ConstructorsConstructorDescriptionField(String name, int number, ProtoSchema.Type type, boolean repeated, String typeName, boolean packed) Checks the field. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.intnumber()Returns the value of thenumberrecord component.booleanpacked()Returns the value of thepackedrecord component.booleanrepeated()Returns the value of therepeatedrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.typeName()Returns the value of thetypeNamerecord component.
-
Constructor Details
-
Field
public Field(String name, int number, ProtoSchema.Type type, boolean repeated, String typeName, boolean packed) Checks the field.- Parameters:
name- the field's namenumber- the field numbertype- the declared typerepeated- whether the field is repeatedtypeName- the referenced type's full name, ornullpacked- whether repeated values are packed
-
-
Method Details
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
number
public int number()Returns the value of thenumberrecord component.- Returns:
- the value of the
numberrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
repeated
public boolean repeated()Returns the value of therepeatedrecord component.- Returns:
- the value of the
repeatedrecord component
-
typeName
Returns the value of thetypeNamerecord component.- Returns:
- the value of the
typeNamerecord component
-
packed
public boolean packed()Returns the value of thepackedrecord component.- Returns:
- the value of the
packedrecord component
-