Example usage for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE

List of usage examples for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE

Introduction

In this page you can find the example usage for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE.

Prototype

ToStringStyle MULTI_LINE_STYLE

To view the source code for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE.

Click Source Link

Document

The multi line toString style.

Usage

From source file:com.xtructure.xneat.network.impl.Connection.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)//
            .append("sourceIndex", sourceNeuronIndex)//
            .append("targetIndex", targetNeuronIndex)//
            .append("weight", weight)//
            .toString();/*from   w w w. j a  va2  s  .  c  o m*/
}

From source file:fr.dudie.nominatim.client.JsonNominatimClientTest.java

@Test
public void testSearchWithResults() throws IOException {

    LOGGER.info("testSearchWithResults.start");

    final List<Address> addresses = nominatimClient.search("vitr, rennes");

    assertNotNull("result list is never null", addresses);
    for (final Address address : addresses) {
        LOGGER.debug(ToStringBuilder.reflectionToString(address, ToStringStyle.MULTI_LINE_STYLE));
    }//from   w w  w  . j a v  a  2s  .  com
    assertTrue("list is not empty", !addresses.isEmpty());

    LOGGER.info("testSearchWithResults.end");
}

From source file:edu.amc.sakai.user.UserEditStub.java

public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", this.id)
            .append("eid", this.eid).append("firstName", this.firstName).append("lastName", this.lastName)
            .append("email", this.email).append("type", this.type).append("properties", this.properties)
            .toString();/*from  ww  w.j  a  v a2s. c  om*/
}

From source file:bixo.examples.crawl.BaseCrawlToolOptions.java

@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
}

From source file:com.jeefuse.system.log.model.GsysLoginlog.java

/** @generated */
@Override//from   ww  w  .ja  v a 2s.  c  o  m
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
            .append("loginIp", loginIp).append("createdate", createdate).append("message", message).toString();
}

From source file:ee.ria.xroad.common.request.DummyCentralServiceHandler.java

private static String toString(Object o) {
    return ToStringBuilder.reflectionToString(o, ToStringStyle.MULTI_LINE_STYLE);
}

From source file:com.yahoo.ycsb.db.AsyncHBaseClient.java

public static void main(String[] args) {
    if (args.length != 4) {
        System.out.println("usage: ahc zkquorum zkpath threadcount operation_count");
        System.exit(0);//from   w  w  w. j a  va2s .  c o m
    }

    final int keyspace = 10000; //120000000;
    final String zkQuorum = args[0];
    final String zkPath = args[1];
    final int threadcount = Integer.parseInt(args[2]);
    final int opcount = Integer.parseInt(args[3]) / threadcount;

    Vector<Thread> allthreads = new Vector<Thread>();

    for (int i = 0; i < threadcount; i++) {
        Thread t = new Thread() {
            public void run() {
                try {
                    Random random = new Random();

                    AsyncHBaseClient cli = new AsyncHBaseClient();

                    Properties props = new Properties();
                    props.setProperty("columnfamily", "f1");
                    props.setProperty("zkquorum", zkQuorum);
                    props.setProperty("zkpath", zkPath);
                    props.setProperty("debug", "true");
                    cli.setProperties(props);

                    cli.init();

                    HashMap<String, ByteIterator> result = Maps.newHashMap();

                    long accum = 0;

                    for (int i = 0; i < opcount; i++) {
                        int keynum = random.nextInt(keyspace);
                        String key = "user" + keynum;
                        long st = System.currentTimeMillis();
                        int rescode;

                        HashMap<String, ByteIterator> hm = Maps.newHashMap();
                        hm.put("field1", new ByteArrayByteIterator("value1".getBytes("UTF-8")));
                        hm.put("field2", new ByteArrayByteIterator("value2".getBytes("UTF-8")));
                        hm.put("field3", new ByteArrayByteIterator("value3".getBytes("UTF-8")));
                        hm.put("efield", new ByteArrayByteIterator(HBaseClient.EMPTY_ARRAY));
                        rescode = cli.insert("bench", key, hm);
                        HashSet<String> s = Sets.newHashSet();
                        s.add("field1");
                        s.add("field2");

                        rescode = cli.read("bench", key, s, result);
                        rescode = cli.delete("bench", key);
                        rescode = cli.read("bench", key, s, result);

                        HashSet<String> scanFields = Sets.newHashSet();
                        scanFields.add("field1");
                        scanFields.add("field3");
                        Vector<HashMap<String, ByteIterator>> scanResults = new Vector<HashMap<String, ByteIterator>>();
                        rescode = cli.scan("bench", "user2", 20, null, scanResults);

                        long en = System.currentTimeMillis();

                        accum += (en - st);

                        if (rescode != Ok) {
                            System.out.println("Error " + rescode + " for " + key);
                        }

                        if (i % 10 == 0) {
                            System.out.println(
                                    i + " operations, average latency: " + (((double) accum) / ((double) i)));
                        }
                    }

                    System.out.println(new ToStringBuilder(cli._client.stats(), ToStringStyle.MULTI_LINE_STYLE)
                            .toString());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        };
        allthreads.add(t);
    }

    long st = System.currentTimeMillis();
    for (Thread t : allthreads) {
        t.start();
    }

    for (Thread t : allthreads) {
        try {
            t.join();
        } catch (InterruptedException e) {
        }
    }
    long en = System.currentTimeMillis();

    System.out.println("Throughput: " + ((1000.0) * (((double) (opcount * threadcount)) / ((double) (en - st))))
            + " ops/sec");

}

From source file:com.jeefuse.system.code.web.rto.GsysCodeRTO.java

/** @generated */
@Override//from   w w  w  .  j  a v a2  s . c  o  m
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("name", name)
            .append("descript", descript).append("kind", kind)
            //.append("gsysCodevalues",gsysCodevalues)
            .toString();
}

From source file:com.autonomy.aci.client.transport.impl.HttpClientFactory.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("maxTotalConnections", maxTotalConnections)
            .append("maxConnectionsPerRoute", maxConnectionsPerRoute)
            .append("connectionTimeout", connectionTimeout).append("linger", linger)
            .append("socketBufferSize", socketBufferSize).append("soKeepAlive", soKeepAlive)
            .append("soReuseAddr", soReuseAddr).append("soTimeout", soTimeout)
            .append("staleCheckingEnabled", staleCheckingEnabled).append("tcpNoDelay", tcpNoDelay)
            .append("useCompression", useCompression).toString();
}

From source file:com.vmware.thinapp.workpool.model.WorkpoolModel.java

@Override
public String toString() {
    // Exclude leases because they're lazily loaded.  Maybe eagerly load them instead?
    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .setExcludeFieldNames(new String[] { "leases", "instances" }).toString();
}