Class AbstractMessage

    • Constructor Detail

      • AbstractMessage

        public AbstractMessage()
    • Method Detail

      • findInitializationErrors

        public List<String> findInitializationErrors()
        Description copied from interface: MessageOrBuilder
        Returns a list of field paths (e.g. "foo.bar.baz") of required fields which are not set in this message. You should call MessageLiteOrBuilder.isInitialized() first to check if there are any missing fields, as that method is likely to be much faster than this one even when the message is fully-initialized.
      • getInitializationErrorString

        public String getInitializationErrorString()
        Description copied from interface: MessageOrBuilder
        Returns a comma-delimited list of required fields which are not set in this message object. You should call MessageLiteOrBuilder.isInitialized() first to check if there are any missing fields, as that method is likely to be much faster than this one even when the message is fully-initialized.
      • hasOneof

        public boolean hasOneof(Descriptors.OneofDescriptor oneof)
        TODO(jieluo): Clear it when all subclasses have implemented this method.
      • getSerializedSize

        public int getSerializedSize()
        Description copied from interface: MessageLite
        Get the number of bytes required to encode this message. The result is only computed on the first call and memoized after that.
      • equals

        public boolean equals(Object other)
        Description copied from interface: Message
        Compares the specified object with this message for equality. Returns true if the given object is a message of the same type (as defined by getDescriptorForType()) and has identical values for all of its fields. Subclasses must implement this; inheriting Object.equals() is incorrect.
        Specified by:
        equals in interface  Message
        Overrides:
        equals in class  Object
        Parameters:
        other - object to be compared for equality with this message
        Returns:
        true if the specified object is equal to this message
      • hashCode

        public int hashCode()
        Description copied from interface: Message
        Returns the hash code value for this message. The hash code of a message should mix the message's type (object identity of the descriptor) with its contents (known and unknown field values). Subclasses must implement this; inheriting Object.hashCode() is incorrect.
        Specified by:
        hashCode in interface  Message
        Overrides:
        hashCode in class  Object
        Returns:
        the hash code value for this message
        See Also:
        Map.hashCode()