Package com.google.protobuf
Enum MapField.StorageMode
- java.lang.Object
-
- java.lang.Enum<MapField.StorageMode>
-
- com.google.protobuf.MapField.StorageMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MapField.StorageMode>
private static enum MapField.StorageMode extends java.lang.Enum<MapField.StorageMode>
Indicates where the data of this map field is currently stored.- MAP: Data is stored in mapData.
- LIST: Data is stored in listData.
- BOTH: mapData and listData have the same data.
When the map field is accessed (through generated API or reflection API), it will shift between these 3 modes:
getMap() getList() getMutableMap() getMutableList() MAP MAP BOTH MAP LIST LIST BOTH LIST MAP LIST BOTH BOTH BOTH MAP LIST
As the map field changes its mode, the list/map reference returned in a previous method call may be invalidated.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
StorageMode()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MapField.StorageMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MapField.StorageMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MAP
public static final MapField.StorageMode MAP
-
LIST
public static final MapField.StorageMode LIST
-
BOTH
public static final MapField.StorageMode BOTH
-
-
Method Detail
-
values
public static MapField.StorageMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MapField.StorageMode c : MapField.StorageMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MapField.StorageMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-