Package com.google.api.resourcenames
Class UntypedResourceName
- java.lang.Object
-
- com.google.api.resourcenames.UntypedResourceName
-
- All Implemented Interfaces:
ResourceName
public class UntypedResourceName extends Object implements ResourceName
A class to represent aResourceName
with an unknown format. This class in intended to support the case of a resource name string in an unexpected format - generated resource name classes with known formats should be preferred where possible.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getFieldValue(String fieldName)
Return the String value of the field with name fieldName.Map<String,String>
getFieldValuesMap()
Return the map of each field name to its value.int
hashCode()
static boolean
isParsableFrom(String formattedString)
static UntypedResourceName
of(ResourceName resourceName)
static UntypedResourceName
parse(String formattedString)
String
toString()
-
-
-
Method Detail
-
of
public static UntypedResourceName of(ResourceName resourceName)
-
parse
public static UntypedResourceName parse(String formattedString)
-
isParsableFrom
public static boolean isParsableFrom(String formattedString)
-
getFieldValuesMap
public Map<String,String> getFieldValuesMap()
Description copied from interface:ResourceName
Return the map of each field name to its value.- Specified by:
getFieldValuesMap
in interfaceResourceName
-
getFieldValue
public String getFieldValue(String fieldName)
Description copied from interface:ResourceName
Return the String value of the field with name fieldName. Returns null if the fieldName was not found.- Specified by:
getFieldValue
in interfaceResourceName
-
-