public void addKeys(AbstractKey... newKeys) { keys.addAll(Do.collection(newKeys)); }
KRing(AbstractKey... kk) { keys = Do.collection(kk); }
public void addSigners(AbstractKey... keys) { addSigners(Do.collection(keys)); }
public void addKeys(AbstractKey... keys) { addKeys(Do.collection(keys)); }
return a.equals(b); if (a.getClass().isArray() || a instanceof Collection) { Collection<?> ca = Do.collection(a); Collection<?> cb = Do.collection(b); if (ca.size() != cb.size()) return false;
private static String traceObject(String prefix, Object obj) { if (obj instanceof Bytes || obj instanceof byte[]) { Bytes bb = obj instanceof Bytes ? (Bytes) obj : new Bytes((byte[]) obj); if (bb.size() > 30) return prefix + bb.part(0, 30).toHex() + String.format(" ...(%d bytes)\n", bb.size() ); return prefix + bb.toHex() + "\n"; } if (obj instanceof Object[] || obj instanceof List<?>) { return traceArray(prefix, Do.collection(obj)); } if (obj instanceof Binder) { Binder i = (Binder) obj; StringBuilder b = new StringBuilder(); for (Map.Entry<String, Object> e : i.entrySet()) { b.append(prefix + e.getKey() + ":\n"); b.append(traceObject(prefix + " ", e.getValue())); } return b.toString(); } return prefix + (obj == null ? "null" : "\"" + obj.toString() + "\"") + "\n"; }