Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file 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 com.amazonaws.services.dynamodbv2.model;
 

Information about item collections, if any, that were affected by the operation. ItemCollectionMetrics is only returned if the request asked for it. If the table does not have any local secondary indexes, this information is not returned in the response.

 
 public class ItemCollectionMetrics implements SerializableCloneable {

    
The hash key value of the item collection. This value is the same as the hash key of the item.
 
     private java.util.Map<String,AttributeValueitemCollectionKey;

    
An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.

The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.

 
The hash key value of the item collection. This value is the same as the hash key of the item.

Returns:
The hash key value of the item collection. This value is the same as the hash key of the item.
 
         
         return ;
     }
    
    
The hash key value of the item collection. This value is the same as the hash key of the item.

Parameters:
itemCollectionKey The hash key value of the item collection. This value is the same as the hash key of the item.
 
     public void setItemCollectionKey(java.util.Map<String,AttributeValueitemCollectionKey) {
         this. = itemCollectionKey;
     }
    
    
The hash key value of the item collection. This value is the same as the hash key of the item.

Returns a reference to this object so that method calls can be chained together.

Parameters:
itemCollectionKey The hash key value of the item collection. This value is the same as the hash key of the item.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         setItemCollectionKey(itemCollectionKey);
         return this;
     }

    
The hash key value of the item collection. This value is the same as the hash key of the item.

The method adds a new key-value pair into ItemCollectionKey parameter, and returns a reference to this object so that method calls can be chained together.

Parameters:
key The key of the entry to be added into ItemCollectionKey.
value The corresponding value of the entry to be added into ItemCollectionKey.
 
     if (null == this.) {
    }
    if (this..containsKey(key))
      throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
    this..put(keyvalue);
    return this;
  }

  
Removes all the entries added into ItemCollectionKey.

Returns a reference to this object so that method calls can be chained together.

    this. = null;
    return this;
  }
  
    
An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.

The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.

Returns:
An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.

The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.

        return ;
    }
    
    
An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.

The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.

Parameters:
sizeEstimateRangeGB An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.

The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.

    public void setSizeEstimateRangeGB(java.util.Collection<DoublesizeEstimateRangeGB) {
        if (sizeEstimateRangeGB == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<DoublesizeEstimateRangeGBCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Double>(sizeEstimateRangeGB.size());
        sizeEstimateRangeGBCopy.addAll(sizeEstimateRangeGB);
        this. = sizeEstimateRangeGBCopy;
    }
    
    
An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.

The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.

NOTE: This method appends the values to the existing list (if any). Use setSizeEstimateRangeGB(java.util.Collection) or withSizeEstimateRangeGB(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sizeEstimateRangeGB An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.

The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.

Returns:
A reference to this updated object so that method calls can be chained together.
    public ItemCollectionMetrics withSizeEstimateRangeGB(Double... sizeEstimateRangeGB) {
        if (getSizeEstimateRangeGB() == nullsetSizeEstimateRangeGB(new java.util.ArrayList<Double>(sizeEstimateRangeGB.length));
        for (Double value : sizeEstimateRangeGB) {
            getSizeEstimateRangeGB().add(value);
        }
        return this;
    }
    
    
An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.

The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sizeEstimateRangeGB An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.

The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.

Returns:
A reference to this updated object so that method calls can be chained together.
    public ItemCollectionMetrics withSizeEstimateRangeGB(java.util.Collection<DoublesizeEstimateRangeGB) {
        if (sizeEstimateRangeGB == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<DoublesizeEstimateRangeGBCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Double>(sizeEstimateRangeGB.size());
            sizeEstimateRangeGBCopy.addAll(sizeEstimateRangeGB);
            this. = sizeEstimateRangeGBCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getItemCollectionKey() != nullsb.append("ItemCollectionKey: " + getItemCollectionKey() + ",");
        if (getSizeEstimateRangeGB() != nullsb.append("SizeEstimateRangeGB: " + getSizeEstimateRangeGB() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getItemCollectionKey() == null) ? 0 : getItemCollectionKey().hashCode()); 
        hashCode = prime * hashCode + ((getSizeEstimateRangeGB() == null) ? 0 : getSizeEstimateRangeGB().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ItemCollectionMetrics == falsereturn false;
        ItemCollectionMetrics other = (ItemCollectionMetrics)obj;
        
        if (other.getItemCollectionKey() == null ^ this.getItemCollectionKey() == nullreturn false;
        if (other.getItemCollectionKey() != null && other.getItemCollectionKey().equals(this.getItemCollectionKey()) == falsereturn false
        if (other.getSizeEstimateRangeGB() == null ^ this.getSizeEstimateRangeGB() == nullreturn false;
        if (other.getSizeEstimateRangeGB() != null && other.getSizeEstimateRangeGB().equals(this.getSizeEstimateRangeGB()) == falsereturn false
        return true;
    }
    
    @Override
    public ItemCollectionMetrics clone() {
        try {
            return (ItemCollectionMetricssuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X