Package com.google.common.base.Objects

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


    }

    @Override
    public String toString()
    {
        ToStringHelper helper = Objects.toStringHelper(this)
                .add("connectorId", connectorId)
                .add("name", name)
                .add("ordinalPosition", ordinalPosition)
                .add("cassandraType", cassandraType);

        if (typeArguments != null && !typeArguments.isEmpty()) {
            helper.add("typeArguments", typeArguments);
        }

        helper.add("partitionKey", partitionKey)
                .add("clusteringKey", clusteringKey)
                .add("indexed", indexed)
                .add("hidden", hidden);

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


   /**
    * @since 1.5
    */
   protected ToStringHelper string() {
      ToStringHelper toString = Objects.toStringHelper("").omitNullValues();
      if (biggest)
         toString.add("biggest", biggest);
      if (fastest)
         toString.add("fastest", fastest);
      toString.add("imageName", imageName);
      toString.add("imageDescription", imageDescription);
      toString.add("imageId", imageId);
      toString.add("imagePredicate", imagePredicate);
      toString.add("imageChooser", imageChooser);
      toString.add("imageVersion", imageVersion);
      if (location != null)
         toString.add("locationId", location.getId());
      if (minCores >0) //TODO: make non-primitive
         toString.add("minCores", minCores);
      if (minRam >0) //TODO: make non-primitive
         toString.add("minRam", minRam);
      if (minRam >0) //TODO: make non-primitive
         toString.add("minRam", minRam);
      if (minDisk >0) //TODO: make non-primitive
         toString.add("minDisk", minDisk);
      toString.add("osFamily", osFamily);
      toString.add("osName", osName);
      toString.add("osDescription", osDescription);
      toString.add("osVersion", osVersion);
      toString.add("osArch", osArch);
      toString.add("os64Bit", os64Bit);
      toString.add("hardwareId", hardwareId);
      toString.add("hypervisor", hypervisor);
      return 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, availabilityZone);
   }

   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);
      toString.add("availability_zone", availabilityZone == null ? null : availabilityZone);
      return toString;
   }
View Full Code Here

      return Objects.hashCode(super.hashCode(), autoAssignFloatingIp, securityGroupNames, generateKeyPair, keyPairName, userData, diskConfig, configDrive,availabilityZone, novaNetworks);
   }

   @Override
   public ToStringHelper string() {
      ToStringHelper toString = super.string();
      if (!autoAssignFloatingIp)
         toString.add("autoAssignFloatingIp", autoAssignFloatingIp);
      if (securityGroupNames.isPresent())
         toString.add("securityGroupNames", securityGroupNames.get());
      if (generateKeyPair)
         toString.add("generateKeyPair", generateKeyPair);
      toString.add("keyPairName", keyPairName);
      toString.add("userData", userData);
      toString.add("diskConfig", diskConfig);
      toString.add("configDrive", configDrive);
      toString.add("availabilityZone", availabilityZone);
      toString.add("novaNetworks", novaNetworks);
      return toString;
   }
View Full Code Here

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

   @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.size() != 0)
         toString.add("groupIds", groupIds);
      toString.add("iamInstanceProfileArn", iamInstanceProfileArn);
      toString.add("iamInstanceProfileName", iamInstanceProfileName);
      return toString;
   }
View Full Code Here

      return this.begin == that.begin && this.end == that.end;
    }

    @Override
    public String toString() {
      ToStringHelper helper = Objects.toStringHelper(this);
      helper.add("begin", this.begin);
      helper.add("end", this.end);
      return helper.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

      return Objects.hashCode(scope, id, parent);
   }

   @Override
   public String toString() {
      ToStringHelper helper = Objects.toStringHelper("").omitNullValues().add("scope", scope).add("id", id)
            .add("description", description);
      if (parent != null)
         helper.add("parent", parent.getId());
      if (iso3166Codes.size() > 0)
         helper.add("iso3166Codes", iso3166Codes);
      if (metadata.size() > 0)
         helper.add("metadata", metadata);
      return helper.toString();
   }
View Full Code Here

      return GleSYSTemplateOptions.class.cast(super.nodeNames(nodeNames));
   }

   @Override
   public ToStringHelper string() {
      ToStringHelper stringHelper = super.string();

      stringHelper.add("transferGB", this.transferGB);
      stringHelper.add("ip", this.ip);
      if (this.hasRootPassword()) {
         stringHelper.add("rootPasswordPresent", true);
      }

      return stringHelper;
   }
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.