Example usage for org.apache.commons.collections15.map ListOrderedMap ListOrderedMap

List of usage examples for org.apache.commons.collections15.map ListOrderedMap ListOrderedMap

Introduction

In this page you can find the example usage for org.apache.commons.collections15.map ListOrderedMap ListOrderedMap.

Prototype

public ListOrderedMap() 

Source Link

Document

Constructs a new empty ListOrderedMap that decorates a HashMap.

Usage

From source file:org.voltdb.ClientResponseImpl.java

@Override
public String toString() {
    Map<String, Object> m = new ListOrderedMap<String, Object>();
    m.put("Status", this.status
            + (this.statusString == null || this.statusString.isEmpty() ? "" : " / " + this.statusString));
    m.put("Handle", this.clientHandle);
    m.put("RequestCounter", this.requestCounter);
    m.put("Throttle", this.throttle);
    m.put("SinglePartition", this.singlepartition);
    m.put("BasePartition", this.basePartition);
    m.put("Exception", m_exception);

    if (this.clientRoundTripTime > 0) {
        m.put("Client RoundTrip Time", this.clientRoundTripTime + " ms");
    }//from   w w  w  .ja  v a  2s  .c  o  m
    if (this.clusterRoundTripTime > 0) {
        m.put("Cluster RoundTrip Time", this.clusterRoundTripTime + " ms");
    }

    Map<String, Object> inner = new ListOrderedMap<String, Object>();
    for (int i = 0; i < results.length; i++) {
        inner.put(String.format("[%d]", i), results[i].toString());
    }
    m.put("Results", inner);

    return String.format("ClientResponse[#%d]\n%s", this.txn_id, StringUtil.formatMaps(m));
}

From source file:org.voltdb.DependencySet.java

@Override
public String toString() {
    Map<String, Object> m = new ListOrderedMap<String, Object>();
    for (int i = 0; i < this.dependencies.length; i++) {
        m.put(Integer.toString(this.depIds[i]), this.dependencies[i].toString());
    } // FOR//w w  w  .  j a  va  2  s . c  o  m
    return (StringUtil.formatMaps(m));

}