本文整理汇总了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();
}
示例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() {
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();
}
示例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());
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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());
}
示例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();
}
示例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();
}
示例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();
}