Java Code Examples for org.apache.commons.lang3.builder.ToStringBuilder#build()

The following examples show how to use org.apache.commons.lang3.builder.ToStringBuilder#build() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ValidationMessage.java    From org.hl7.fhir.core with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a representation of this ValidationMessage suitable for logging. The values of
 * most of the internal fields are included, so this may not be suitable for display to 
 * an end user.
 */
@Override
public String toString() {
  ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
  b.append("level", level);
  b.append("type", type);
  b.append("location", location);
  b.append("message", message);
  return b.build();
}
 
Example 2
Source File: Depositor.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    builder.append("id", id);
    builder.append("version", version);
    builder.append("name", name);
    builder.append("surname", surname);
    return builder.build();
}
 
Example 3
Source File: Depositor.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    builder.append("id", id);
    builder.append("version", version);
    builder.append("name", name);
    builder.append("surname", surname);
    return builder.build();
}
 
Example 4
Source File: Edge.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
public String asString() {
    final ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    builder.append("id", getId());
    builder.append("labels", getLabels());
    builder.append("from", from);
    builder.append("to", to);
    builder.append("attributes", getAttributes());
    return builder.build();
}
 
Example 5
Source File: Node.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
public String asString() {
    final ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    builder.append("id", getId());
    builder.append("labels", getLabels());
    builder.append("attributes", getAttributes());
    return builder.build();
}
 
Example 6
Source File: Person.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    builder.append("id", id);
    builder.append("name", name);
    builder.append("surname", surname);
    return builder.build();
}
 
Example 7
Source File: CookingRecipe.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    builder.append("id", id);
    builder.append("name", name);
    builder.append("description", description);
    return builder.build();
}
 
Example 8
Source File: Depositor.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    builder.append("id", id);
    builder.append("version", version);
    builder.append("name", name);
    builder.append("surname", surname);
    return builder.build();
}
 
Example 9
Source File: Customer.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    builder.append("id", id);
    builder.append("version", version);
    builder.append("name", name);
    builder.append("surname", surname);
    return builder.build();
}
 
Example 10
Source File: MocoTestConfig.java    From tcases with MIT License 5 votes vote down vote up
public String toString()
{
ToStringBuilder builder = 
  ToString.getBuilder( this)
  .append( getServerType())
  .append( getServerConfig());

Optional.ofNullable( getCertConfig()).ifPresent( cert -> builder.append( cert));

return builder.build();
}
 
Example 11
Source File: D2S.java    From riiablo with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
  ToStringBuilder builder = new ToStringBuilder(this)
      .append("header", DebugUtils.toByteArray(header))
      .append("version", version)
      .append("size", size);
  for (int i = 0; i < NUM_DIFFS; i++) {
    builder.append("data[" + i + "]", data[i]);
  }
  return builder.build();
}
 
Example 12
Source File: D2S.java    From riiablo with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
  ToStringBuilder builder = new ToStringBuilder(this)
      .append("header", DebugUtils.toByteArray(header))
      .append("version", version)
      .append("size", size);
  for (int i = 0; i < NUM_DIFFS; i++) {
    builder.append("diff[" + i + "]", diff[i]);
  }
  return builder.build();
}
 
Example 13
Source File: D2S.java    From riiablo with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
  ToStringBuilder builder = new ToStringBuilder(this)
      .append("header", DebugUtils.toByteArray(header))
      .append("size", size);
  for (int i = 0; i < NUM_GREETINGS; i++) {
    for (int j = 0; j < NUM_DIFFS; j++) {
      builder.append("data[" + i + "][" + j + "][GREETING_INTRO]", DebugUtils.toByteArray(data[i][j]));
      builder.append("data[" + i + "][" + j + "][GREETING_RETURN]", DebugUtils.toByteArray(data[i][j]));
    }
  }
  return builder.build();
}
 
Example 14
Source File: D2S.java    From riiablo with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
  ToStringBuilder builder = new ToStringBuilder(this)
      .append("header", DebugUtils.toByteArray(header))
      .append("size", size)
      .append("actualSize", items.size);
  for (int i = 0; i < items.size; i++) {
    builder.append("items[" + i + "]", items.get(i).getName());
  }
  return builder.build();
}
 
Example 15
Source File: DS1.java    From riiablo with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
  ToStringBuilder builder = new ToStringBuilder(this)
      .append("type", getType())
      .append("id", id)
      .append("x", x)
      .append("y", y)
      .append("ds1Flags", String.format("%08x", flags));
  if (path != null) builder.append("path", path);
  return builder.build();
}
 
Example 16
Source File: Technology.java    From jpa-unit with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    builder.append("name", name);
    return builder.build();
}