本文整理汇总了Java中com.google.common.base.Objects.ToStringHelper.toString方法的典型用法代码示例。如果您正苦于以下问题:Java ToStringHelper.toString方法的具体用法?Java ToStringHelper.toString怎么用?Java ToStringHelper.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.base.Objects.ToStringHelper
的用法示例。
在下文中一共展示了ToStringHelper.toString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
ToStringHelper helper = Objects.toStringHelper(this);
helper.add("row", Bytes.toStringBinary(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()));
helper.add("family", Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength()));
helper.add("is shadow cell?", isShadowCell);
helper.add("qualifier",
Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength()));
if (isShadowCell()) {
int qualifierLength = qualifierLengthFromShadowCellQualifier(cell.getQualifierArray(),
cell.getQualifierOffset(),
cell.getQualifierLength());
helper.add("qualifier whithout shadow cell suffix",
Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), qualifierLength));
}
helper.add("ts", cell.getTimestamp());
return helper.toString();
}
示例2: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
private String toString(boolean includePrivate) {
final ToStringHelper helper = Objects.toStringHelper(this).omitNullValues();
helper.add("pub", Utils.HEX.encode(pub.getEncoded()));
if (includePrivate) {
try {
helper.add("priv", Utils.HEX.encode(getPrivKey().toByteArray()));
} catch (IllegalStateException e) {
// TODO: Make hasPrivKey() work for deterministic keys and fix this.
}
}
if (creationTimeSeconds > 0)
helper.add("creationTimeSeconds", creationTimeSeconds);
helper.add("keyCrypter", keyCrypter);
if (includePrivate)
helper.add("encryptedPrivateKey", encryptedPrivateKey);
helper.add("isEncrypted", isEncrypted());
return helper.toString();
}
示例3: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
private String toString(boolean includePrivate, NetworkParameters params) {
final ToStringHelper helper = Objects.toStringHelper(this).omitNullValues();
helper.add("pub HEX", getPublicKeyAsHex());
if (includePrivate) {
try {
helper.add("priv HEX", getPrivateKeyAsHex());
helper.add("priv WIF", getPrivateKeyAsWiF(params));
} catch (IllegalStateException e) {
// TODO: Make hasPrivKey() work for deterministic keys and fix this.
}
}
if (creationTimeSeconds > 0)
helper.add("creationTimeSeconds", creationTimeSeconds);
helper.add("keyCrypter", keyCrypter);
if (includePrivate)
helper.add("encryptedPrivateKey", encryptedPrivateKey);
helper.add("isEncrypted", isEncrypted());
return helper.toString();
}
示例4: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
final ToStringHelper helper = Objects.toStringHelper(this.getClass());
helper.add("service", getService());
helper.add("id", getId());
helper.add("verificationId", verificationId.or("none"));
helper.add("state", getState());
helper.add("startedDate",getStartedDate());
if (getCompletedDate().isPresent()) {
helper.add("completed", getCompletedDate().get());
}
else {
helper.add("completed", "running");
}
return helper.toString();
}
示例5: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString(){
ToStringHelper helper = Objects.toStringHelper(this)
.add("id", getId())
.add("arguments", getArguments());
MapDifference<FieldName, ?> difference = getDifference();
if(difference != null){
helper.add("difference", getDifference());
}
Exception exception = getException();
if(exception != null){
helper.add("exception", exception);
}
return helper.toString();
}
示例6: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
private String toString(boolean includePrivate, NetworkParameters params) {
final ToStringHelper helper = Objects.toStringHelper(this).omitNullValues();
helper.add("pub HEX", getPublicKeyAsHex());
if (includePrivate) {
try {
helper.add("priv HEX", getPrivateKeyAsHex());
helper.add("priv WIF", getPrivateKeyAsWiF(params));
} catch (IllegalStateException e) {
// TODO: Make hasPrivKey() work for deterministic keys and fix this.
}
}
if (creationTimeSeconds > 0)
helper.add("creationTimeSeconds", creationTimeSeconds);
helper.add("keyCrypter", keyCrypter);
if (includePrivate)
helper.add("encryptedPrivateKey", encryptedPrivateKey);
helper.add("isEncrypted", isEncrypted());
helper.add("isPubKeyOnly", isPubKeyOnly());
return helper.toString();
}
示例7: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
ToStringHelper b = Objects.toStringHelper(type.toString())
.omitNullValues()
.add("host", hostName)
.add("servlet", servletPath)
.add("repo", repositoryName)
.add("rev", revision)
.add("old", oldRevision)
.add("path", path)
.add("extension", extension);
if (!params.isEmpty()) {
b.add("params", params);
}
b.add("anchor", anchor);
return b.toString();
}
示例8: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
ToStringHelper toStringHelper = Objects.toStringHelper("ReadWriteList");
for (T t : this) {
toStringHelper.addValue(t);
}
return toStringHelper.toString();
}
示例9: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
// print only the user-settable fields
ToStringHelper helper = Objects.toStringHelper(this).omitNullValues();
helper.add("emptyWallet", emptyWallet);
helper.add("changeAddress", changeAddress);
helper.add("fee", fee);
helper.add("feePerTxSize", feePerTxSize);
helper.add("ensureMinRequiredFee", ensureMinRequiredFee);
helper.add("signTransaction", signTransaction);
helper.add("aesKey", aesKey != null ? "set" : null); // careful to not leak the key
helper.add("coinSelector", coinSelector);
helper.add("shuffleOutputs", shuffleOutputs);
return helper.toString();
}
示例10: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
final ToStringHelper helper = Objects.toStringHelper(this).omitNullValues();
helper.add("pub", Utils.HEX.encode(pub.getEncoded()));
helper.add("chainCode", HEX.encode(chainCode));
helper.add("path", getPathAsString());
if (creationTimeSeconds > 0)
helper.add("creationTimeSeconds", creationTimeSeconds);
return helper.toString();
}
示例11: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
// print only the user-settable fields
ToStringHelper helper = Objects.toStringHelper(this).omitNullValues();
helper.add("emptyWallet", emptyWallet);
helper.add("changeAddress", changeAddress);
helper.add("fee", fee);
helper.add("feePerKb", feePerKb);
helper.add("ensureMinRequiredFee", ensureMinRequiredFee);
helper.add("signInputs", signInputs);
helper.add("aesKey", aesKey != null ? "set" : null); // careful to not leak the key
helper.add("coinSelector", coinSelector);
helper.add("shuffleOutputs", shuffleOutputs);
return helper.toString();
}
示例12: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
ToStringHelper helper = Objects.toStringHelper(this)
.add("challenger", this.challenger.getName())
.add("challenged", this.challenged.getName())
.add("accepted", this.isAccepted());
return helper.toString();
}
示例13: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
ToStringHelper helper = Objects.toStringHelper(this);
helper.add("outcome", this.outcome);
helper.add("score", this.score);
helper.add("parent", this.parent);
return helper.toString();
}
示例14: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
ToStringHelper helper = Objects.toStringHelper(this);
helper.add("begin", this.begin);
helper.add("end", this.end);
return helper.toString();
}
示例15: toString
import com.google.common.base.Objects.ToStringHelper; //导入方法依赖的package包/类
@Override
public String toString() {
final ToStringHelper helper = Objects.toStringHelper(this).omitNullValues();
helper.add("pub", Utils.bytesToHexString(pub));
helper.add("chainCode", Utils.bytesToHexString(chainCode));
helper.add("path", getPathAsString());
if (creationTimeSeconds > 0)
helper.add("creationTimeSeconds", creationTimeSeconds);
helper.add("isEncrypted", isEncrypted());
helper.add("isPubKeyOnly", isPubKeyOnly());
return helper.toString();
}