当前位置: 首页>>代码示例>>Java>>正文


Java ToStringHelper.toString方法代码示例

本文整理汇总了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();
}
 
开发者ID:apache,项目名称:incubator-omid,代码行数:19,代码来源:CellUtils.java

示例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();
}
 
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:19,代码来源:ECKey.java

示例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();
}
 
开发者ID:DigiByte-Team,项目名称:digibytej-alice,代码行数:20,代码来源:ECKey.java

示例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();
}
 
开发者ID:yammer,项目名称:backups,代码行数:20,代码来源:BackupMetadata.java

示例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();
}
 
开发者ID:jpmml,项目名称:jpmml-evaluator,代码行数:19,代码来源:Conflict.java

示例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();
}
 
开发者ID:Cybnate,项目名称:NuBitsj,代码行数:21,代码来源:ECKey.java

示例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();
}
 
开发者ID:afrojer,项目名称:gitiles,代码行数:18,代码来源:GitilesView.java

示例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();
}
 
开发者ID:DanceFirstThinkLater,项目名称:PetiteRPC,代码行数:9,代码来源:ReadWriteList.java

示例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();
}
 
开发者ID:filipnyquist,项目名称:lbry-android,代码行数:16,代码来源:SendRequest.java

示例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();
}
 
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:11,代码来源:DeterministicKey.java

示例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();
}
 
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:16,代码来源:Wallet.java

示例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();
}
 
开发者ID:arianne,项目名称:stendhal,代码行数:9,代码来源:PlayerVsPlayerChallenge.java

示例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();
}
 
开发者ID:tudarmstadt-lt,项目名称:GermaNER,代码行数:9,代码来源:ViterbiClassifier.java

示例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();
}
 
开发者ID:ClearTK,项目名称:cleartk,代码行数:8,代码来源:AnnotationStatistics.java

示例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();
}
 
开发者ID:bither,项目名称:bitherj,代码行数:13,代码来源:DeterministicKey.java


注:本文中的com.google.common.base.Objects.ToStringHelper.toString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。