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 aResourceNamewith 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 booleanequals(Object o)StringgetFieldValue(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.inthashCode()static booleanisParsableFrom(String formattedString)static UntypedResourceNameof(ResourceName resourceName)static UntypedResourceNameparse(String formattedString)StringtoString()
-
-
-
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:ResourceNameReturn the map of each field name to its value.- Specified by:
getFieldValuesMapin interfaceResourceName
-
getFieldValue
public String getFieldValue(String fieldName)
Description copied from interface:ResourceNameReturn the String value of the field with name fieldName. Returns null if the fieldName was not found.- Specified by:
getFieldValuein interfaceResourceName
-
-