Class AbstractMessage

    • Field Detail

      • memoizedSize

        protected int memoizedSize
    • Constructor Detail

      • AbstractMessage

        public AbstractMessage()
    • Method Detail

      • 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. If this message requires more than Integer.MAX_VALUE bytes to encode, the return value will be smaller than the actual number of bytes required and might be negative.
        Specified by:
        getSerializedSize in interface MessageLite
      • 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()
      • hashLong

        @Deprecated
        protected static int hashLong​(long n)
        Deprecated.
        from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.
      • hashBoolean

        @Deprecated
        protected static int hashBoolean​(boolean b)
        Deprecated.
        from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.
      • hashEnum

        @Deprecated
        protected static int hashEnum​(Internal.EnumLite e)
        Deprecated.
        from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.
      • hashEnumList

        @Deprecated
        protected static int hashEnumList​(List<? extends Internal.EnumLite> list)
        Deprecated.
        from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.