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 http://www.apache.org/licenses/LICENSE-2.0 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.cloudsigma.domain;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.util.Set;
 
 

Author(s):
Adrian Cole
 
 public class Item {
    public static class Builder {
       protected String uuid;
       protected String name;
       protected Set<Stringuse = ImmutableSet.of();
 
       public Builder uuid(String uuid) {
          this. = uuid;
          return this;
       }
 
       public Builder name(String name) {
          this. = name;
          return this;
       }
 
       public Builder use(Iterable<Stringuse) {
          this. = ImmutableSet.copyOf(checkNotNull(use"use"));
          return this;
       }
 
       public Item build() {
          return new Item();
       }
 
       @Override
       public int hashCode() {
          final int prime = 31;
          int result = 1;
          result = prime * result + (( == null) ? 0 : .hashCode());
          result = prime * result + (( == null) ? 0 : .hashCode());
          result = prime * result + (( == null) ? 0 : .hashCode());
          return result;
       }
 
       @Override
       public boolean equals(Object obj) {
          if (this == obj)
             return true;
          if (obj == null)
             return false;
          if (getClass() != obj.getClass())
             return false;
          Builder other = (Builderobj;
          if ( == null) {
             if (other.name != null)
                return false;
          } else if (!.equals(other.name))
             return false;
          if ( == null) {
             if (other.use != null)
                return false;
          } else if (!.equals(other.use))
             return false;
          if ( == null) {
             if (other.uuid != null)
                return false;
          } else if (!.equals(other.uuid))
             return false;
          return true;
       }
    }
 
    @Nullable
    protected final String uuid;
    protected final String name;
    protected final Set<Stringuse;
   public Item(@Nullable String uuidString nameIterable<Stringuse) {
      this. = uuid;
      this. = checkNotNull(name"name");
      this. = ImmutableSet.copyOf(checkNotNull(use"use"));
   }

   

Returns:
uuid of the item.
   public String getUuid() {
      return ;
   }

   

Returns:
name of the item
   public String getName() {
      return ;
   }

   

Returns:
list of use
   public Set<StringgetUse() {
      return ;
   }
   public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + (( == null) ? 0 : .hashCode());
      result = prime * result + (( == null) ? 0 : .hashCode());
      return result;
   }
   public boolean equals(Object obj) {
      if (this == obj)
         return true;
      if (obj == null)
         return false;
      if (getClass() != obj.getClass())
         return false;
      Item other = (Itemobj;
      if ( == null) {
         if (other.name != null)
            return false;
      } else if (!.equals(other.name))
         return false;
      if ( == null) {
         if (other.use != null)
            return false;
      } else if (!.equals(other.use))
         return false;
      return true;
   }
   public String toString() {
      return "[uuid=" +  + ", name=" +  + ", use=" +  + "]";
   }
New to GrepCode? Check out our FAQ X