Class MapFieldSchemaLite

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<?,​?> forMapData​(java.lang.Object mapField)
      Returns the map data for read.
      MapEntryLite.Metadata<?,​?> forMapMetadata​(java.lang.Object mapDefaultEntry)
      Returns the metadata from a default entry.
      java.util.Map<?,​?> forMutableMapData​(java.lang.Object mapField)
      Returns the map data for mutation.
      int getSerializedSize​(int fieldNumber, java.lang.Object mapField, java.lang.Object mapDefaultEntry)
      Compute the serialized size for the map with a given field number.
      private static <K,​V>
      int
      getSerializedSizeLite​(int fieldNumber, java.lang.Object mapField, java.lang.Object defaultEntry)  
      boolean isImmutable​(java.lang.Object mapField)
      Whether toImmutable() has been called on this map field.
      java.lang.Object mergeFrom​(java.lang.Object destMapField, java.lang.Object srcMapField)
      Merges srcMapField into destMapField, and returns the merged instance.
      private static <K,​V>
      MapFieldLite<K,​V>
      mergeFromLite​(java.lang.Object destMapField, java.lang.Object srcMapField)  
      java.lang.Object newMapField​(java.lang.Object unused)
      Returns a new instance of the map field given a map default entry.
      java.lang.Object toImmutable​(java.lang.Object mapField)
      Returns an immutable instance of the map field.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapFieldSchemaLite

        MapFieldSchemaLite()
    • Method Detail

      • forMutableMapData

        public java.util.Map<?,​?> forMutableMapData​(java.lang.Object mapField)
        Description copied from interface: MapFieldSchema
        Returns the map data for mutation.
        Specified by:
        forMutableMapData in interface MapFieldSchema
      • forMapData

        public java.util.Map<?,​?> forMapData​(java.lang.Object mapField)
        Description copied from interface: MapFieldSchema
        Returns the map data for read.
        Specified by:
        forMapData in interface MapFieldSchema
      • isImmutable

        public boolean isImmutable​(java.lang.Object mapField)
        Description copied from interface: MapFieldSchema
        Whether toImmutable() has been called on this map field.
        Specified by:
        isImmutable in interface MapFieldSchema
      • toImmutable

        public java.lang.Object toImmutable​(java.lang.Object mapField)
        Description copied from interface: MapFieldSchema
        Returns an immutable instance of the map field. It may make the parameter immutable and return the parameter, or create an immutable copy. The status of the parameter after the call is undefined.
        Specified by:
        toImmutable in interface MapFieldSchema
      • newMapField

        public java.lang.Object newMapField​(java.lang.Object unused)
        Description copied from interface: MapFieldSchema
        Returns a new instance of the map field given a map default entry.
        Specified by:
        newMapField in interface MapFieldSchema
      • mergeFrom

        public java.lang.Object mergeFrom​(java.lang.Object destMapField,
                                          java.lang.Object srcMapField)
        Description copied from interface: MapFieldSchema
        Merges srcMapField into destMapField, and returns the merged instance.
        Specified by:
        mergeFrom in interface MapFieldSchema
      • mergeFromLite

        private static <K,​V> MapFieldLite<K,​V> mergeFromLite​(java.lang.Object destMapField,
                                                                         java.lang.Object srcMapField)
      • getSerializedSize

        public int getSerializedSize​(int fieldNumber,
                                     java.lang.Object mapField,
                                     java.lang.Object mapDefaultEntry)
        Description copied from interface: MapFieldSchema
        Compute the serialized size for the map with a given field number.
        Specified by:
        getSerializedSize in interface MapFieldSchema
      • getSerializedSizeLite

        private static <K,​V> int getSerializedSizeLite​(int fieldNumber,
                                                             java.lang.Object mapField,
                                                             java.lang.Object defaultEntry)