@Override
 public String toString() {
   MoreObjects.ToStringHelper helper = MoreObjects.toStringHelper(this);
   helper.add(CLASS, klass.getName());
   for (Map.Entry<String, String> entry : options.entrySet())
     helper.add(entry.getKey(), entry.getValue());
   return helper.toString();
 }
示例#2
0
 @Override
 public String toString() {
   MoreObjects.ToStringHelper helper = MoreObjects.toStringHelper(this);
   if (noMatch()) {
     helper.add("NO_MATCH", true);
   } else if (!hasQuery()) {
     helper.add("MATCH_ALL", true);
   } else {
     helper.add("query", query);
   }
   return helper.toString();
 }
示例#3
0
  @Override
  public String toString() {
    MoreObjects.ToStringHelper toStringHelper = MoreObjects.toStringHelper(this);
    toStringHelper.add("deadline", deadline);
    toStringHelper.add("authority", authority);
    toStringHelper.add("callCredentials", credentials);
    toStringHelper.add("affinity", affinity);
    toStringHelper.add("executor", executor != null ? executor.getClass() : null);
    toStringHelper.add("compressorName", compressorName);
    toStringHelper.add("customOptions", Arrays.deepToString(customOptions));
    toStringHelper.add("waitForReady", isWaitForReady());

    return toStringHelper.toString();
  }
示例#4
0
 /**
  * Returns a string representation for this MapMaker instance. The exact form of the returned
  * string is not specificed.
  */
 @Override
 public String toString() {
   MoreObjects.ToStringHelper s = MoreObjects.toStringHelper(this);
   if (initialCapacity != UNSET_INT) {
     s.add("initialCapacity", initialCapacity);
   }
   if (concurrencyLevel != UNSET_INT) {
     s.add("concurrencyLevel", concurrencyLevel);
   }
   if (keyStrength != null) {
     s.add("keyStrength", Ascii.toLowerCase(keyStrength.toString()));
   }
   if (valueStrength != null) {
     s.add("valueStrength", Ascii.toLowerCase(valueStrength.toString()));
   }
   if (keyEquivalence != null) {
     s.addValue("keyEquivalence");
   }
   return s.toString();
 }
示例#5
0
 /**
  * Returns a string representation for this CacheBuilder instance. The exact form of the returned
  * string is not specified.
  */
 @Override
 public String toString() {
   MoreObjects.ToStringHelper s = MoreObjects.toStringHelper(this);
   if (initialCapacity != UNSET_INT) {
     s.add("initialCapacity", initialCapacity);
   }
   if (concurrencyLevel != UNSET_INT) {
     s.add("concurrencyLevel", concurrencyLevel);
   }
   if (maximumSize != UNSET_INT) {
     s.add("maximumSize", maximumSize);
   }
   if (maximumWeight != UNSET_INT) {
     s.add("maximumWeight", maximumWeight);
   }
   if (expireAfterWriteNanos != UNSET_INT) {
     s.add("expireAfterWrite", expireAfterWriteNanos + "ns");
   }
   if (expireAfterAccessNanos != UNSET_INT) {
     s.add("expireAfterAccess", expireAfterAccessNanos + "ns");
   }
   if (keyStrength != null) {
     s.add("keyStrength", Ascii.toLowerCase(keyStrength.toString()));
   }
   if (valueStrength != null) {
     s.add("valueStrength", Ascii.toLowerCase(valueStrength.toString()));
   }
   if (keyEquivalence != null) {
     s.addValue("keyEquivalence");
   }
   if (valueEquivalence != null) {
     s.addValue("valueEquivalence");
   }
   if (removalListener != null) {
     s.addValue("removalListener");
   }
   return s.toString();
 }