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.kinesis.model;
 

Represents the output for ListStreams .

 
 public class ListStreamsResult implements SerializableCloneable {

    
The names of the streams that are associated with the AWS account making the ListStreams request.
 
If set to true, there are more streams available to list.
 
     private Boolean hasMoreStreams;

    
The names of the streams that are associated with the AWS account making the ListStreams request.

Returns:
The names of the streams that are associated with the AWS account making the ListStreams request.
 
     public java.util.List<StringgetStreamNames() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
The names of the streams that are associated with the AWS account making the ListStreams request.

Parameters:
streamNames The names of the streams that are associated with the AWS account making the ListStreams request.
 
     public void setStreamNames(java.util.Collection<StringstreamNames) {
         if (streamNames == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringstreamNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(streamNames.size());
         streamNamesCopy.addAll(streamNames);
         this. = streamNamesCopy;
     }
    
    
The names of the streams that are associated with the AWS account making the ListStreams request.

NOTE: This method appends the values to the existing list (if any). Use setStreamNames(java.util.Collection) or withStreamNames(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:
streamNames The names of the streams that are associated with the AWS account making the ListStreams request.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ListStreamsResult withStreamNames(String... streamNames) {
         if (getStreamNames() == nullsetStreamNames(new java.util.ArrayList<String>(streamNames.length));
         for (String value : streamNames) {
             getStreamNames().add(value);
         }
         return this;
     }
    
    
The names of the streams that are associated with the AWS account making the ListStreams request.

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

Parameters:
streamNames The names of the streams that are associated with the AWS account making the ListStreams request.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListStreamsResult withStreamNames(java.util.Collection<StringstreamNames) {
        if (streamNames == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringstreamNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(streamNames.size());
            streamNamesCopy.addAll(streamNames);
            this. = streamNamesCopy;
        }
        return this;
    }

    
If set to true, there are more streams available to list.

Returns:
If set to true, there are more streams available to list.
    public Boolean isHasMoreStreams() {
        return ;
    }
    
    
If set to true, there are more streams available to list.

Parameters:
hasMoreStreams If set to true, there are more streams available to list.
    public void setHasMoreStreams(Boolean hasMoreStreams) {
        this. = hasMoreStreams;
    }
    
    
If set to true, there are more streams available to list.

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

Parameters:
hasMoreStreams If set to true, there are more streams available to list.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListStreamsResult withHasMoreStreams(Boolean hasMoreStreams) {
        this. = hasMoreStreams;
        return this;
    }

    
If set to true, there are more streams available to list.

Returns:
If set to true, there are more streams available to list.
    public Boolean getHasMoreStreams() {
        return ;
    }

    
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 (getStreamNames() != nullsb.append("StreamNames: " + getStreamNames() + ",");
        if (isHasMoreStreams() != nullsb.append("HasMoreStreams: " + isHasMoreStreams() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getStreamNames() == null) ? 0 : getStreamNames().hashCode()); 
        hashCode = prime * hashCode + ((isHasMoreStreams() == null) ? 0 : isHasMoreStreams().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ListStreamsResult == falsereturn false;
        ListStreamsResult other = (ListStreamsResult)obj;
        
        if (other.getStreamNames() == null ^ this.getStreamNames() == nullreturn false;
        if (other.getStreamNames() != null && other.getStreamNames().equals(this.getStreamNames()) == falsereturn false
        if (other.isHasMoreStreams() == null ^ this.isHasMoreStreams() == nullreturn false;
        if (other.isHasMoreStreams() != null && other.isHasMoreStreams().equals(this.isHasMoreStreams()) == falsereturn false
        return true;
    }
    
    @Override
    public ListStreamsResult clone() {
        try {
            return (ListStreamsResultsuper.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