Package com.google.common.base.Objects

Examples of com.google.common.base.Objects.ToStringHelper


      return Objects.hashCode(name, pkg, metadata);
   }

   @Override
   public String toString() {
      ToStringHelper toString = Objects.toStringHelper("").omitNullValues();
      toString.add("name", name).add("package", name);
      if (metadata.size() > 0)
         toString.add("metadata", metadata);
      return toString.toString();
   }
View Full Code Here


        evaluators.add(evaluator);
        return this;
    }

    public String toStringOf(Object p, String propertyNames) {
        final ToStringHelper stringHelper = Objects.toStringHelper(p);
        for (final Clause clause : iterable(propertyNames)) {
            stringHelper.add(clause.getPropertyName(), asString(clause, p));
        }
        return stringHelper.toString();
    }
View Full Code Here

        evaluators.add(evaluator);
        return this;
    }

    public String toStringOf(Object p, String propertyNames) {
        final ToStringHelper stringHelper = Objects.toStringHelper(p);
        for (final Clause clause : iterable(propertyNames)) {
            stringHelper.add(clause.getPropertyName(), asString(clause, p));
        }
        return stringHelper.toString();
    }
View Full Code Here

               .hashCode(super.hashCode(), groupNames, keyPair, noKeyPair, userData, userData, blockDeviceMappings);
   }

   @Override
   public ToStringHelper string() {
      ToStringHelper toString = super.string();
      if (groupNames.size() != 0)
         toString.add("groupNames", groupNames);
      if (noKeyPair)
         toString.add("noKeyPair", noKeyPair);
      toString.add("keyPair", keyPair);
      if (userData != null && userData.size() > 0)
         toString.add("userDataCksum", Hashing.crc32().hashBytes(Bytes.toArray(userData)));
      ImmutableSet<BlockDeviceMapping> mappings = blockDeviceMappings.build();
      if (mappings.size() != 0)
         toString.add("blockDeviceMappings", mappings);
      return toString;
   }
View Full Code Here

   public int hashCode() {
      return Objects.hashCode(keyName, securityGroupNames, metadata, personality, adminPass, networks);
   }

   protected ToStringHelper string() {
      ToStringHelper toString = Objects.toStringHelper("").omitNullValues();
      toString.add("keyName", keyName);
      if (securityGroupNames.size() > 0)
         toString.add("securityGroupNames", securityGroupNames);
      if (metadata.size() > 0)
         toString.add("metadata", metadata);
      if (personality.size() > 0)
         toString.add("personality", personality);
      if (adminPass != null)
         toString.add("adminPassPresent", true);
      if (diskConfig != null)
         toString.add("diskConfig", diskConfig);
      toString.add("userData", userData == null ? null : new String(userData));
      if (!networks.isEmpty())
         toString.add("networks", networks);
      return toString;
   }
View Full Code Here

      return Objects.hashCode(enabled, type, policy, natRules);
   }

   @Override
   public String toString() {
      ToStringHelper helper = Objects.toStringHelper("").omitNullValues().add("enabled", enabled)
            .add("type", type).add("policy", policy);
      if (natRules.size() >0)
         helper.add("natRules", natRules);
      return helper.toString();
   }
View Full Code Here

      return true;
   }

   @Override
   public ToStringHelper string() {
      ToStringHelper toString = super.string().omitNullValues();
      toString.add("privateNetworking", privateNetworking);
      toString.add("backupsEnabled", backupsEnabled);
      if (!sshKeyIds.isEmpty()) {
         toString.add("sshKeyIds", sshKeyIds);
      }
      return toString;
   }
View Full Code Here

    public Object getData() {
        return data;
    }

    protected ToStringHelper createToStringHelper() {
        ToStringHelper helper = Objects.toStringHelper(this);
        helper.add("rowKey", rowKey);
        helper.add("data", data);

        return helper;
    }
View Full Code Here

        this.domain = domain;
    }

    @Override
    public String toString() {
        ToStringHelper helper = Objects.toStringHelper(this);

        helper.add("name", name).add("iso", iso).add("domain", domain);

        return helper.toString();
    }
View Full Code Here

               spotPrice, spotOptions, groupIds, iamInstanceProfileArn, iamInstanceProfileName);
   }

   @Override
   public ToStringHelper string() {
      ToStringHelper toString = super.string();
      if (monitoringEnabled)
         toString.add("monitoringEnabled", monitoringEnabled);
      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.size() != 0)
         toString.add("groupIds", groupIds);
      toString.add("iamInstanceProfileArn", iamInstanceProfileArn);
      toString.add("iamInstanceProfileName", iamInstanceProfileName);
      return toString;
   }
View Full Code Here

TOP

Related Classes of com.google.common.base.Objects.ToStringHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.