Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to jclouds, Inc. (jclouds) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. jclouds licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 package org.jclouds.elb.domain;
 import static;
 import java.util.Set;

Adrian Cole
See also:
 public class PolicyType {
    public static Builder<?> builder() {
       return new ConcreteBuilder();
    public Builder<?> toBuilder() {
       return new ConcreteBuilder().fromPolicyType(this);
    public static abstract class Builder<T extends Builder<T>> {
       protected abstract T self();
       protected String name;
       protected String description;
       protected ImmutableSet.Builder<AttributeMetadata<?>> attributeMetadata = ImmutableSet.<AttributeMetadata<?>> builder();

       public T name(String name) {
          this. = name;
          return self();

       public T description(String description) {
          this. = description;
          return self();

       public T attributeMetadata(Iterable<AttributeMetadata<?>> attributeMetadata) {
          return self();

       public T attributeMetadata(AttributeMetadata<?> attributeMetadata) {
          return self();
       public PolicyType build() {
          return new PolicyType(.build());
       public T fromPolicyType(PolicyType in) {
    private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
       protected ConcreteBuilder self() {
          return this;
   protected final String name;
   protected final String description;
   protected final Set<AttributeMetadata<?>> attributeMetadata;
   protected PolicyType(String nameString descriptionIterable<AttributeMetadata<?>> attributeMetadata) {
      this. = checkNotNull(name"name");
      this. = checkNotNull(description"description");
      this. = ImmutableSet.copyOf(checkNotNull(attributeMetadata"attributeMetadata"));

The name of the policy type.
   public String getName() {
      return ;

A human-readable description of the policy type.
   public String getDescription() {
      return ;

The description of the policy attributes associated with the LoadBalancer policies defined by the Elastic Load Balancing service.
      return ;

   public int hashCode() {
      return Objects.hashCode();

   public boolean equals(Object obj) {
      if (this == obj)
         return true;
      if (obj == null)
         return false;
      if (getClass() != obj.getClass())
         return false;
      PolicyType other = (PolicyTypeobj;
      return Objects.equal(;

   public String toString() {
      return Objects.toStringHelper(this).omitNullValues().add("name").add("description")
New to GrepCode? Check out our FAQ X