test_class.file: rice-middleware/client-contrib/src/test/java/org/kuali/rice/krad/util/PatternedStringBuilderTest.java
test_class.identifier: PatternedStringBuilderTest
test_case.body: @Test
      public void testSprintf() {
          double pi = Math.PI;
          PatternedStringBuilder patterenedStringBuilder = new PatternedStringBuilder("pi = %5.3f");
          String expectedVal = patterenedStringBuilder.sprintf(pi);
          assertEquals("pi = 3.142", expectedVal);
          patterenedStringBuilder.setPattern("%4$2s %3$2s %2$2s %1$2s");
          assertEquals(" z  y  x  w", patterenedStringBuilder.sprintf("w", "x", "y", "z"));
          patterenedStringBuilder.setPattern("");
          assertEquals("", patterenedStringBuilder.sprintf("somethingElse"));
          // This basically replicates tests done via jdk to test java.util.Formatter.java
      }
test_case.class_method_signature: PatternedStringBuilderTest.testSprintf()
test_case.full_signature: @Test public void testSprintf()
test_case.identifier: testSprintf
test_case.invocations: sprintf assertEquals setPattern assertEquals sprintf setPattern assertEquals sprintf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSprintf()
focal_class.declarator: _pattern
focal_class.modifier: private
focal_class.original_string: private String _pattern;
focal_class.type: String
focal_class.var_name: _pattern
focal_class.file: rice-middleware/client-contrib/src/main/java/org/kuali/rice/krad/util/PatternedStringBuilder.java
focal_class.identifier: PatternedStringBuilder
focal_class.class_method_signature: PatternedStringBuilder.PatternedStringBuilder(String pattern)
focal_class.full_signature: public  PatternedStringBuilder(String pattern)
focal_class.identifier: PatternedStringBuilder
focal_class.modifiers: public
focal_class.parameters: (String pattern)
focal_class.signature:  PatternedStringBuilder(String pattern)
focal_class.class_method_signature: PatternedStringBuilder.setPattern(String pattern)
focal_class.full_signature: public void setPattern(String pattern)
focal_class.identifier: setPattern
focal_class.modifiers: public
focal_class.parameters: (String pattern)
focal_class.return: void
focal_class.signature: void setPattern(String pattern)
focal_class.class_method_signature: PatternedStringBuilder.getPattern()
focal_class.full_signature: public String getPattern()
focal_class.identifier: getPattern
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPattern()
focal_class.class_method_signature: PatternedStringBuilder.sprintf(Object... args)
focal_class.full_signature: public String sprintf(Object... args)
focal_class.identifier: sprintf
focal_class.modifiers: public
focal_class.parameters: (Object... args)
focal_class.return: String
focal_class.signature: String sprintf(Object... args)
focal_method.body: public String sprintf(Object... args) {
          ByteArrayOutputStream retval = new ByteArrayOutputStream();
  
          new PrintStream(retval).printf(getPattern(), args);
  
          return retval.toString();
      }
focal_method.class_method_signature: PatternedStringBuilder.sprintf(Object... args)
focal_method.full_signature: public String sprintf(Object... args)
focal_method.identifier: sprintf
focal_method.invocations: printf getPattern toString
focal_method.modifiers: public
focal_method.parameters: (Object... args)
focal_method.return: String
focal_method.signature: String sprintf(Object... args)