@Test public void testBuild() { String name = underTest. type("myclass"). property("property1"). property("property2"). build(); assertThat(name, is("myclass_property1_property2_idx")); }
public String build() { checkState(!properties.isEmpty(), "At least one property required"); StringBuilder buff = new StringBuilder(); if (type != null) { buff.append(type); buff.append(TYPE_SEPARATOR); } Joiner.on(PROPERTY_SEPARATOR).appendTo(buff, properties); if (caseInsensitive) { buff.append(CASE_INSENSITIVE); } buff.append(SUFFIX); return buff.toString().toLowerCase(Locale.US); }
OIndexNameBuilder { public String build() { checkState(!properties.isEmpty(), "At least one property required"); StringBuilder buff = new StringBuilder(); if (type != null) { buff.append(type); buff.append(TYPE_SEPARATOR); } Joiner.on(PROPERTY_SEPARATOR).appendTo(buff, properties); if (caseInsensitive) { buff.append(CASE_INSENSITIVE); } buff.append(SUFFIX); return buff.toString().toLowerCase(Locale.US); } }
OIndexNameBuilder { public String build() { checkState(!properties.isEmpty(), "At least one property required"); StringBuilder buff = new StringBuilder(); if (type != null) { buff.append(type); buff.append(TYPE_SEPARATOR); } Joiner.on(PROPERTY_SEPARATOR).appendTo(buff, properties); if (caseInsensitive) { buff.append(CASE_INSENSITIVE); } buff.append(SUFFIX); return buff.toString().toLowerCase(Locale.US); }  }
OIndexNameBuilder { public String build() { checkState(!properties.isEmpty(), "At least one property required"); StringBuilder buff = new StringBuilder(); if (type != null) { buff.append(type); buff.append(TYPE_SEPARATOR); } Joiner.on(PROPERTY_SEPARATOR).appendTo(buff, properties); if (caseInsensitive) { buff.append(CASE_INSENSITIVE); } buff.append(SUFFIX); return buff.toString().toLowerCase(Locale.US); }  OIndexNameBuilder type(final String type); OIndexNameBuilder property(final String property); OIndexNameBuilder caseInsensitive(); String build(); }
OIndexNameBuilder { public String build() { checkState(!properties.isEmpty(), "At least one property required"); StringBuilder buff = new StringBuilder(); if (type != null) { buff.append(type); buff.append(TYPE_SEPARATOR); } Joiner.on(PROPERTY_SEPARATOR).appendTo(buff, properties); if (caseInsensitive) { buff.append(CASE_INSENSITIVE); } buff.append(SUFFIX); return buff.toString().toLowerCase(Locale.US); }  OIndexNameBuilder type(final String type); OIndexNameBuilder property(final String property); OIndexNameBuilder caseInsensitive(); String build(); static final String TYPE_SEPARATOR; static final String PROPERTY_SEPARATOR; static final String CASE_INSENSITIVE; static final String SUFFIX; }