com.amazonaws.services.ec2.model
Class Filter

java.lang.Object
  extended by com.amazonaws.services.ec2.model.Filter

public class Filter
extends Object

A filter used to limit results when describing tags. Multiple values can be specified per filter. A tag must match at least one of the specified values for it to be returned from an operation.

Wildcards can be included in filter values; * specifies that zero or more characters must match, and ? specifies that exactly one character must match. Use a backslash to escape special characters. For example, a filter value of \*amazon\?\\ specifies the literal string *amazon?\ .


Constructor Summary
Filter()
          Default constructor for a new Filter object.
Filter(String name)
          Constructs a new Filter object.
Filter(String name, List<String> values)
          Constructs a new Filter object.
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
          Specifies the name of the filter.
 List<String> getValues()
          Contains one or more values for the filter.
 int hashCode()
           
 void setName(String name)
          Specifies the name of the filter.
 void setValues(Collection<String> values)
          Contains one or more values for the filter.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 Filter withName(String name)
          Specifies the name of the filter.
 Filter withValues(Collection<String> values)
          Contains one or more values for the filter.
 Filter withValues(String... values)
          Contains one or more values for the filter.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Filter

public Filter()
Default constructor for a new Filter object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


Filter

public Filter(String name,
              List<String> values)
Constructs a new Filter object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
name - Specifies the name of the filter.
values - Contains one or more values for the filter.

Filter

public Filter(String name)
Constructs a new Filter object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
name - Specifies the name of the filter.
Method Detail

getName

public String getName()
Specifies the name of the filter.

Returns:
Specifies the name of the filter.

setName

public void setName(String name)
Specifies the name of the filter.

Parameters:
name - Specifies the name of the filter.

withName

public Filter withName(String name)
Specifies the name of the filter.

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

Parameters:
name - Specifies the name of the filter.
Returns:
A reference to this updated object so that method calls can be chained together.

getValues

public List<String> getValues()
Contains one or more values for the filter.

Returns:
Contains one or more values for the filter.

setValues

public void setValues(Collection<String> values)
Contains one or more values for the filter.

Parameters:
values - Contains one or more values for the filter.

withValues

public Filter withValues(String... values)
Contains one or more values for the filter.

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

Parameters:
values - Contains one or more values for the filter.
Returns:
A reference to this updated object so that method calls can be chained together.

withValues

public Filter withValues(Collection<String> values)
Contains one or more values for the filter.

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

Parameters:
values - Contains one or more values for the filter.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.