Example usage for org.apache.commons.lang3.builder ToStringBuilder append

List of usage examples for org.apache.commons.lang3.builder ToStringBuilder append

Introduction

In this page you can find the example usage for org.apache.commons.lang3.builder ToStringBuilder append.

Prototype

public ToStringBuilder append(final String fieldName, final short[] array) 

Source Link

Document

Append to the toString a short array.

Usage

From source file:com.thelastcheck.io.base.RecordImpl.java

public String toString() {
    ToStringStyle style = ToStringStyle.MULTI_LINE_STYLE;
    ToStringBuilder sb = new ToStringBuilder(this, style);
    sb.append("position", recordPosition);
    sb.append("offset", offsetPosition);
    int fieldNumber = 1;
    int maxFields = numberOfFields();
    while (fieldNumber <= maxFields) {
        Field field = field(fieldNumber);
        field.formatToString(record, sb);
        fieldNumber++;//from   www  . ja va  2 s  .  c  o m
    }
    return sb.toString();
}

From source file:com.anrisoftware.sscontrol.core.service.AbstractService.java

@Override
public String toString() {
    ToStringBuilder builder;
    builder = new ToStringBuilder(this).append(NAME, getName());
    if (profile != null) {
        builder.append(PROFILE, profile.getProfileName());
    }/* w  ww.  ja va2  s  .  c  o  m*/
    return builder.toString();
}

From source file:com.mgmtp.jfunk.core.module.ContainerModule.java

@Override
public String toString() {
    ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    tsb.append("name", name);
    if (moduleArchiveDir != null) {
        tsb.append("moduleArchiveDir", moduleArchiveDir);
    }/*from w ww . j  av  a2  s  .c  o m*/
    tsb.append("error", error);
    tsb.append("modules", transform(modulesWithCallbacks, new Function<ModuleWithCallbacks, TestModule>() {
        @Override
        public TestModule apply(final ModuleWithCallbacks input) {
            return input.testModule;
        }
    }));
    return tsb.toString();
}

From source file:com.norconex.committer.core.AbstractBatchCommitter.java

@Override
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    builder.appendSuper(super.toString());
    builder.append("commitBatchSize", commitBatchSize);
    builder.append("maxRetries", maxRetries);
    builder.append("maxRetryWait", maxRetryWait);
    builder.append("operations", operations);
    return builder.toString();
}

From source file:com.mgmtp.jfunk.core.module.TestModuleImpl.java

@Override
public String toString() {
    ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    tsb.append("name", getName());
    tsb.append("executionMode", executionMode);
    tsb.append("breakIndex", breakIndex);
    return tsb.toString();
}

From source file:com.mgmtp.perfload.core.client.web.response.ResponseInfo.java

@Override
public String toString() {
    ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    tsb.append("uri", uri);
    tsb.append("methodType", methodType);
    tsb.append("statusCode", statusCode);
    tsb.append("timeIntervalBeforeBody", timeIntervalBeforeBody);
    tsb.append("timeIntervalTotal", timeIntervalTotal);
    tsb.append("headers", headers);
    tsb.append("charset", charset);
    tsb.append("extraInfo", extraInfo);
    tsb.append("executionId", executionId);
    tsb.append("detailExtractionNames", detailExtractionNames);
    if (body != null) {
        tsb.append("body", bodyAsString);
    }//from www .  j  a v  a  2  s  .c  o m
    // We don't want line breaks in the result
    return LINE_BREAK_PATTERN.matcher(tsb.toString()).replaceAll(" ");
}

From source file:com.mgmtp.jfunk.data.generator.data.FormData.java

@Override
public String toString() {
    ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    tsb.append("key", key);
    tsb.append("entries", entries);
    tsb.append("fixedValuesMap", fixedValuesMap);
    return tsb.toString();
}

From source file:dk.netdesign.common.osgi.config.Attribute.java

@Override
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this);
    builder.append("id", id).append("name", name).append("description", description)
            .append("defValue", defValue).append("optionalLabels", optionalLabels)
            .append("optionalValues", optionalValues).append("filter", filter).append("getterName", getterName)
            .append("setterName", setterName);
    return builder.toString();
}

From source file:com.nmote.smpp.SMPPAddress.java

/**
 * String representation./* www  . ja va 2  s  . c  o  m*/
 *
 * @return a String
 */
@Override
public String toString() {
    ToStringBuilder b = new ToStringBuilder(this);
    b.append("ton", getTon());
    b.append("npi", getNpi());
    b.append("address", getAddress());
    return b.toString();
}

From source file:com.azaptree.services.executor.ThreadPoolExecutor.java

@Override
public String toString() {
    final ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
    sb.append("activeCount", getActiveCount());
    sb.append("corePoolSize", getCorePoolSize());
    sb.append("largestPoolSize", getLargestPoolSize());
    sb.append("maximumPoolSize", getMaximumPoolSize());
    sb.append("poolSize", getPoolSize());
    sb.append("completedTaskCount", getCompletedTaskCount());
    sb.append("keepAliveTimeSecs", getKeepAliveTime(TimeUnit.SECONDS));
    sb.append("name", getName());
    sb.append("taskCount", getTaskCount());
    sb.append("allowsCoreThreadTimeOut", allowsCoreThreadTimeOut());
    return sb.toString();
}