public static ToleratedUpdateError parseMetadataIfToleratedUpdateError(String metadataKey,String metadataVal){
  if (!metadataKey.startsWith(META_PRE)) {
    return null;
  }
  final int typeEnd=metadataKey.indexOf(':',META_PRE_LEN);
  if (typeEnd < 0) {
    return null;
  }
  return new ToleratedUpdateError(CmdType.valueOf(metadataKey.substring(META_PRE_LEN,typeEnd)),metadataKey.substring(typeEnd + 1),metadataVal);
}

public static ToleratedUpdateError parseMetadataIfToleratedUpdateError ( String metadataKey , String metadataVal ) { if ( ! metadataKey . startsWith ( META_PRE ) ) { return null ; } final int typeEnd = metadataKey . indexOf ( ':' , META_PRE_LEN ) ; if ( typeEnd < 0 ) { return null ; } return new ToleratedUpdateError ( CmdType . valueOf ( metadataKey . substring ( META_PRE_LEN , typeEnd ) ) , metadataKey . substring ( typeEnd + 1 ) , metadataVal ) ; }
returns a toleratedupdateerror instance if this metadatakey is one we care about , else null
