test_class.declarator: builder
test_class.modifier: private
test_class.original_string: private LabelBuilder builder;
test_class.type: LabelBuilder
test_class.var_name: builder
test_class.file: ballroom/src/test/java/org/jboss/hal/ballroom/LabelBuilderTest.java
test_class.identifier: LabelBuilderTest
test_case.body: @Test
      public void enumeration() throws Exception {
          assertEquals("'First'", builder.enumeration(singletonList("first"), "and"));
          assertEquals("'First' or 'Second'", builder.enumeration(asList("first", "second"), "or"));
          assertEquals("'First', 'Second' and / or 'Third'",
                  builder.enumeration(asList("first", "second", "third"), "and / or"));
      }
test_case.class_method_signature: LabelBuilderTest.enumeration()
test_case.full_signature: @Test public void enumeration()
test_case.identifier: enumeration
test_case.invocations: assertEquals enumeration singletonList assertEquals enumeration asList assertEquals enumeration asList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void enumeration()
focal_class.declarator: QUOTE = "'"
focal_class.modifier: private static final
focal_class.original_string: private static final String QUOTE = "'";
focal_class.type: String
focal_class.var_name: QUOTE
focal_class.declarator: SPACE = " "
focal_class.modifier: private static final
focal_class.original_string: private static final String SPACE = " ";
focal_class.type: String
focal_class.var_name: SPACE
focal_class.declarator: SPECIALS = ImmutableMap.<String, String>builder()
              .put("ajp", "AJP")
              .put("ccm", "CCM")
              .put("dn", "DN")
              .put("ear", "EAR")
              .put("ee", "EE")
              .put("ejb", "EJB")
              .put("ejb3", "EJB3")
              .put("giop", "GIOP")
              .put("gss", "GSS")
              .put("ha", "HA")
              .put("http", "HTTP")
              .put("https", "HTTPS")
              .put("http2", "HTTP/2")
              .put("id", "ID")
              .put("iiop", "IIOP")
              .put("iiop-ssl", "IIOP SSL")
              .put("io", "IO")
              .put("ip", "IP")
              .put("jaas", "JAAS")
              .put("jacc", "JACC")
              .put("jaspi", "JASPI")
              .put("jaxrs", "JAX-RS")
              .put("jboss", "JBoss")
              .put("jdbc", "JDBC")
              .put("jca", "JCA")
              .put("jdr", "JDA")
              .put("jgroups", "JGroups")
              .put("jms", "JMS")
              .put("jmx", "JMX")
              .put("jndi", "JNDI")
              .put("jpa", "JPA")
              .put("jsf", "JSF")
              .put("json", "JSON")
              .put("jsse", "JSSE")
              .put("jsr", "JSR")
              .put("jta", "JTA")
              .put("jts", "JTS")
              .put("jvm", "JVM")
              .put("jwt", "JWT")
              .put("mcp", "MCP")
              .put("mdb", "MDB")
              .put("mbean", "MBean")
              .put("microprofile", "MicroProfile")
              .put("oauth2", "OAuth 2")
              .put("otp", "OTP")
              .put("rdn", "RDN")
              .put("sar", "SAR")
              .put("sasl", "SASL")
              .put("sfsb", "SFSB")
              .put("slsb", "SLSB")
              .put("sni", "SNI")
              .put("sql", "SQL")
              .put("ssl", "SSL")
              .put("tcp", "TCP")
              .put("tls", "TLS")
              .put("ttl", "TTL")
              .put("tx", "TX")
              .put("udp", "UDP")
              .put("uri", "URI")
              .put("url", "URL")
              .put("uuid", "UUID")
              .put("vm", "VM")
              .put("xa", "XA")
              .put("wsdl", "WSDL")
              .build()
focal_class.modifier: @SuppressWarnings("HardCodedStringLiteral")
      private final
focal_class.original_string: @SuppressWarnings("HardCodedStringLiteral")
      private final ImmutableMap<String, String> SPECIALS = ImmutableMap.<String, String>builder()
              .put("ajp", "AJP")
              .put("ccm", "CCM")
              .put("dn", "DN")
              .put("ear", "EAR")
              .put("ee", "EE")
              .put("ejb", "EJB")
              .put("ejb3", "EJB3")
              .put("giop", "GIOP")
              .put("gss", "GSS")
              .put("ha", "HA")
              .put("http", "HTTP")
              .put("https", "HTTPS")
              .put("http2", "HTTP/2")
              .put("id", "ID")
              .put("iiop", "IIOP")
              .put("iiop-ssl", "IIOP SSL")
              .put("io", "IO")
              .put("ip", "IP")
              .put("jaas", "JAAS")
              .put("jacc", "JACC")
              .put("jaspi", "JASPI")
              .put("jaxrs", "JAX-RS")
              .put("jboss", "JBoss")
              .put("jdbc", "JDBC")
              .put("jca", "JCA")
              .put("jdr", "JDA")
              .put("jgroups", "JGroups")
              .put("jms", "JMS")
              .put("jmx", "JMX")
              .put("jndi", "JNDI")
              .put("jpa", "JPA")
              .put("jsf", "JSF")
              .put("json", "JSON")
              .put("jsse", "JSSE")
              .put("jsr", "JSR")
              .put("jta", "JTA")
              .put("jts", "JTS")
              .put("jvm", "JVM")
              .put("jwt", "JWT")
              .put("mcp", "MCP")
              .put("mdb", "MDB")
              .put("mbean", "MBean")
              .put("microprofile", "MicroProfile")
              .put("oauth2", "OAuth 2")
              .put("otp", "OTP")
              .put("rdn", "RDN")
              .put("sar", "SAR")
              .put("sasl", "SASL")
              .put("sfsb", "SFSB")
              .put("slsb", "SLSB")
              .put("sni", "SNI")
              .put("sql", "SQL")
              .put("ssl", "SSL")
              .put("tcp", "TCP")
              .put("tls", "TLS")
              .put("ttl", "TTL")
              .put("tx", "TX")
              .put("udp", "UDP")
              .put("uri", "URI")
              .put("url", "URL")
              .put("uuid", "UUID")
              .put("vm", "VM")
              .put("xa", "XA")
              .put("wsdl", "WSDL")
              .build();
focal_class.type: ImmutableMap<String, String>
focal_class.var_name: SPECIALS
focal_class.file: ballroom/src/main/java/org/jboss/hal/ballroom/LabelBuilder.java
focal_class.identifier: LabelBuilder
focal_class.class_method_signature: LabelBuilder.label(Property property)
focal_class.full_signature: public String label(Property property)
focal_class.identifier: label
focal_class.modifiers: public
focal_class.parameters: (Property property)
focal_class.return: String
focal_class.signature: String label(Property property)
focal_class.class_method_signature: LabelBuilder.label(String name)
focal_class.full_signature: public String label(String name)
focal_class.identifier: label
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: String
focal_class.signature: String label(String name)
focal_class.class_method_signature: LabelBuilder.enumeration(Iterable<String> names, String conjunction)
focal_class.full_signature: public String enumeration(Iterable<String> names, String conjunction)
focal_class.identifier: enumeration
focal_class.modifiers: public
focal_class.parameters: (Iterable<String> names, String conjunction)
focal_class.return: String
focal_class.signature: String enumeration(Iterable<String> names, String conjunction)
focal_class.class_method_signature: LabelBuilder.replaceSpecial(String label)
focal_class.full_signature: private String replaceSpecial(String label)
focal_class.identifier: replaceSpecial
focal_class.modifiers: private
focal_class.parameters: (String label)
focal_class.return: String
focal_class.signature: String replaceSpecial(String label)
focal_class.class_method_signature: LabelBuilder.capitalize(String str)
focal_class.full_signature: private String capitalize(String str)
focal_class.identifier: capitalize
focal_class.modifiers: private
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String capitalize(String str)
focal_method.body: public String enumeration(Iterable<String> names, String conjunction) {
          String enumeration = "";
          if (names != null && !Iterables.isEmpty(names)) {
              int size = Iterables.size(names);
              if (size == 1) {
                  return QUOTE + label(names.iterator().next()) + QUOTE;
              } else if (size == 2) {
                  return QUOTE + label(Iterables.getFirst(names, "")) + QUOTE +
                          SPACE + conjunction + SPACE +
                          QUOTE + label(Iterables.getLast(names)) + QUOTE;
              } else {
                  String last = Iterables.getLast(names);
                  LinkedList<String> allButLast = new LinkedList<>();
                  Iterables.addAll(allButLast, names);
                  allButLast.removeLast();
                  enumeration = allButLast.stream()
                          .map(name -> QUOTE + label(name) + QUOTE)
                          .collect(Collectors.joining(", "));
                  enumeration = enumeration + SPACE + conjunction + SPACE + QUOTE + label(last) + QUOTE;
              }
          }
          return enumeration;
      }
focal_method.class_method_signature: LabelBuilder.enumeration(Iterable<String> names, String conjunction)
focal_method.full_signature: public String enumeration(Iterable<String> names, String conjunction)
focal_method.identifier: enumeration
focal_method.invocations: isEmpty size label next iterator label getFirst label getLast getLast addAll removeLast collect map stream label joining label
focal_method.modifiers: public
focal_method.parameters: (Iterable<String> names, String conjunction)
focal_method.return: String
focal_method.signature: String enumeration(Iterable<String> names, String conjunction)