Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.jclouds.openstack.swift.v1.domain;
  
  import static com.google.common.base.Objects.equal;
  import static com.google.common.base.Objects.toStringHelper;
  
  

Author(s):
Adrian Cole
See also:
api doc
 
 public class AccountMetadata {
 
    public static Builder builder() {
       return new Builder();
    }
 
    public Builder toBuilder() {
       return builder().fromAccountMetadata(this);
    }
 
    public static class Builder {
       protected int containerCount;
       protected long bytesUsed;

      
 
       public Builder containerCount(int containerCount) {
          this. = containerCount;
          return this;
       }

      
 
       public Builder bytesUsed(long bytesUsed) {
          this. = bytesUsed;
          return this;
       }
 
       public AccountMetadata build() {
          return new AccountMetadata();
       }
 
       public Builder fromAccountMetadata(AccountMetadata from) {
          return containerCount(from.getContainerCount()).bytesUsed(from.getBytesUsed());
       }
    }
   
    protected int containerCount;
    protected long bytesUsed;
 
    @ConstructorProperties({"containerCount""bytesUsed"})
    protected AccountMetadata(int containerCountlong bytesUsed) {
       this. = containerCount;
       this. = bytesUsed;
    }

   

Returns:
the number of containers in OpenStack Object Storage for the account
 
    public int getContainerCount() {
       return ;
    }

   

Returns:
the total bytes stored in OpenStack Object Storage for the account
 
    public long getBytesUsed() {
       return ;
    }
 
    @Override
    public boolean equals(Object object) {
       if (this == object) {
          return true;
       }
       if (object instanceof AccountMetadata) {
          final AccountMetadata other = AccountMetadata.class.cast(object);
          return equal(getContainerCount(), other.getContainerCount()) && equal(getBytesUsed(), other.getBytesUsed());
       } else {
          return false;
       }
    }
 
    @Override
    public int hashCode() {
       return Objects.hashCode(getContainerCount(), getBytesUsed());
    }
 
    @Override
    public String toString() {
       return string().toString();
    }
   protected ToStringHelper string() {
      return toStringHelper("").add("containerCount"getContainerCount()).add("bytesUsed"getBytesUsed());
   }
New to GrepCode? Check out our FAQ X