@Test public void getIntegerOptionCodeNull() { Assert.assertNull( FhirToDhisOptionSetUtils.getIntegerOptionCode( null, Pattern.compile( "(.*)" ) ) ); }
@Nullable public static String getIntegerOptionCode( @Nullable String code, @Nullable Pattern pattern ) { if ( (code == null) || (pattern == null) ) { return code; } final Matcher matcher = pattern.matcher( code ); if ( !matcher.matches() ) { return null; } if ( matcher.groupCount() != 1 ) { throw new TransformerScriptException( "Pattern to resolveRule integer options must have exactly one group: " + pattern.pattern() ); } return matcher.group( 1 ); }
FhirToDhisOptionSetUtils { @Nullable public static String getIntegerOptionCode( @Nullable String code, @Nullable Pattern pattern ) { if ( (code == null) || (pattern == null) ) { return code; } final Matcher matcher = pattern.matcher( code ); if ( !matcher.matches() ) { return null; } if ( matcher.groupCount() != 1 ) { throw new TransformerScriptException( "Pattern to resolveRule integer options must have exactly one group: " + pattern.pattern() ); } return matcher.group( 1 ); } }
FhirToDhisOptionSetUtils { @Nullable public static String getIntegerOptionCode( @Nullable String code, @Nullable Pattern pattern ) { if ( (code == null) || (pattern == null) ) { return code; } final Matcher matcher = pattern.matcher( code ); if ( !matcher.matches() ) { return null; } if ( matcher.groupCount() != 1 ) { throw new TransformerScriptException( "Pattern to resolveRule integer options must have exactly one group: " + pattern.pattern() ); } return matcher.group( 1 ); } private  FhirToDhisOptionSetUtils(); }
FhirToDhisOptionSetUtils { @Nullable public static String getIntegerOptionCode( @Nullable String code, @Nullable Pattern pattern ) { if ( (code == null) || (pattern == null) ) { return code; } final Matcher matcher = pattern.matcher( code ); if ( !matcher.matches() ) { return null; } if ( matcher.groupCount() != 1 ) { throw new TransformerScriptException( "Pattern to resolveRule integer options must have exactly one group: " + pattern.pattern() ); } return matcher.group( 1 ); } private  FhirToDhisOptionSetUtils(); @Nullable static String getIntegerOptionCode( @Nullable String code, @Nullable Pattern pattern ); @Nonnull static List<String> resolveIntegerOptionCodes( @Nonnull OptionSet optionSet, @Nullable Pattern pattern ); }
FhirToDhisOptionSetUtils { @Nullable public static String getIntegerOptionCode( @Nullable String code, @Nullable Pattern pattern ) { if ( (code == null) || (pattern == null) ) { return code; } final Matcher matcher = pattern.matcher( code ); if ( !matcher.matches() ) { return null; } if ( matcher.groupCount() != 1 ) { throw new TransformerScriptException( "Pattern to resolveRule integer options must have exactly one group: " + pattern.pattern() ); } return matcher.group( 1 ); } private  FhirToDhisOptionSetUtils(); @Nullable static String getIntegerOptionCode( @Nullable String code, @Nullable Pattern pattern ); @Nonnull static List<String> resolveIntegerOptionCodes( @Nonnull OptionSet optionSet, @Nullable Pattern pattern );  }