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


Java ToStringHelper类代码示例

本文整理汇总了Java中com.google.common.base.Objects.ToStringHelper的典型用法代码示例。如果您正苦于以下问题:Java ToStringHelper类的具体用法?Java ToStringHelper怎么用?Java ToStringHelper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ToStringHelper类属于com.google.common.base.Objects包,在下文中一共展示了ToStringHelper类的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() {
    final ToStringHelper helper = Objects.toStringHelper(this.getClass());

    helper.add("service", getService());
    helper.add("id", getId());
    helper.add("backupId", backupId);
    helper.add("state", getState());
    helper.add("startedDate", getStartedDate());

    if (getCompletedDate().isPresent()){
        helper.add("completedDate", getCompletedDate().get());
    }
    else {
        helper.add("completedDate", "running");
    }

    return helper.toString();
}
 
开发者ID:yammer,项目名称:backups,代码行数:20,代码来源:VerificationMetadata.java

示例6: innerDescribe

import com.google.common.base.Objects.ToStringHelper; //导入依赖的package包/类
private static void innerDescribe(TextView textBox, ToStringHelper helper) {
    if (null != textBox.getText()) {
        helper.add("text", textBox.getText());
    }

    if (null != textBox.getError()) {
        helper.add("error-text", textBox.getError());
    }

    if (null != textBox.getHint()) {
        helper.add("hint", textBox.getHint());
    }

    helper.add("input-type", textBox.getInputType());
    helper.add("ime-target", textBox.isInputMethodTarget());
}
 
开发者ID:DocuSignDev,项目名称:android-test-kit,代码行数:17,代码来源:HumanReadables.java

示例7: string

import com.google.common.base.Objects.ToStringHelper; //导入依赖的package包/类
@Override
public ToStringHelper string() {
   ToStringHelper toString = super.string();
   if (monitoringEnabled)
      toString.add("monitoringEnabled", monitoringEnabled);
    if (publicIpAddressAssociated)
        toString.add("publicIpAddressAssociated", publicIpAddressAssociated);
   toString.add("placementGroup", placementGroup);
   if (noPlacementGroup)
      toString.add("noPlacementGroup", noPlacementGroup);
   toString.add("subnetId", subnetId);
   toString.add("spotPrice", spotPrice);
   if (spotOptions != RequestSpotInstancesOptions.NONE)
      toString.add("spotOptions", spotOptions);
   if (!groupIds.isEmpty())
      toString.add("groupIds", groupIds);
   toString.add("iamInstanceProfileArn", iamInstanceProfileArn);
   toString.add("iamInstanceProfileName", iamInstanceProfileName);
   toString.add("privateIpAddress", privateIpAddress);
   return toString;
}
 
开发者ID:apache,项目名称:stratos,代码行数:22,代码来源:AWSEC2TemplateOptions.java

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: toStringHelper

import com.google.common.base.Objects.ToStringHelper; //导入依赖的package包/类
@Override
protected ToStringHelper toStringHelper(){
	return super.toStringHelper()
		.add("defineFunction", getDefineFunction())
		.add("feature", getFeature())
		.add("value", getValue());
}
 
开发者ID:jpmml,项目名称:jpmml-sparkml,代码行数:8,代码来源:TermFeature.java

示例13: 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

示例14: 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

示例15: 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


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