public static SnapshotMode parse(String value,String defaultValue){
  SnapshotMode mode=parse(value);
  if (mode == null && defaultValue != null)   mode=parse(defaultValue);
  return mode;
}

public static SnapshotMode parse ( String value , String defaultValue ) { SnapshotMode mode = parse ( value ) ; if ( mode == null && defaultValue != null ) mode = parse ( defaultValue ) ; return mode ; }
determine if the supplied value is one of the predefined options .
