Package org.jclouds.s3.domain.internal
Class ListBucketResponseImpl
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- java.util.HashSet<E>
-
- java.util.LinkedHashSet<ObjectMetadata>
-
- org.jclouds.s3.domain.internal.ListBucketResponseImpl
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<ObjectMetadata>
,Collection<ObjectMetadata>
,Set<ObjectMetadata>
,ListBucketResponse
public class ListBucketResponseImpl extends LinkedHashSet<ObjectMetadata> implements ListBucketResponse
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ListBucketResponseImpl(String name, Iterable<ObjectMetadata> contents, String prefix, String marker, String nextMarker, int maxKeys, String delimiter, boolean isTruncated, Set<String> commonPrefixes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Set<String>
getCommonPrefixes()
Example:String
getDelimiter()
Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection.String
getMarker()
int
getMaxKeys()
The maximum number of keys you'd like to see in the response body.String
getName()
name of the BucketString
getNextMarker()
Indicates where in the bucket to begin listing.String
getPrefix()
Limits the response to keys which begin with the indicated prefix.int
hashCode()
boolean
isTruncated()
There are more then maxKeys available-
Methods inherited from class java.util.LinkedHashSet
spliterator
-
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
-
Methods inherited from class java.util.AbstractSet
removeAll
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
getCommonPrefixes
public Set<String> getCommonPrefixes()
Example: if the following keys are in the bucket a/1/a
a/1/b
a/2/a
a/2/b
and prefix is set toa/
and delimiter is set to/
then commonprefixes would return 1,2- Specified by:
getCommonPrefixes
in interfaceListBucketResponse
- See Also:
ListBucketOptions.getPrefix()
-
getDelimiter
public String getDelimiter()
Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response.- Specified by:
getDelimiter
in interfaceListBucketResponse
-
getMarker
public String getMarker()
- Specified by:
getMarker
in interfaceListBucketResponse
-
getNextMarker
public String getNextMarker()
Indicates where in the bucket to begin listing. The list will only include keys that occur lexicographically after marker. This is convenient for pagination: To get the next page of results use the last key of the current page as the marker.- Specified by:
getNextMarker
in interfaceListBucketResponse
-
getMaxKeys
public int getMaxKeys()
The maximum number of keys you'd like to see in the response body. The server might return fewer than this many keys, but will not return more.- Specified by:
getMaxKeys
in interfaceListBucketResponse
-
getPrefix
public String getPrefix()
Limits the response to keys which begin with the indicated prefix. You can use prefixes to separate a bucket into different sets of keys in a way similar to how a file system uses folders.- Specified by:
getPrefix
in interfaceListBucketResponse
-
isTruncated
public boolean isTruncated()
There are more then maxKeys available- Specified by:
isTruncated
in interfaceListBucketResponse
-
getName
public String getName()
name of the Bucket- Specified by:
getName
in interfaceListBucketResponse
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<ObjectMetadata>
- Specified by:
hashCode
in interfaceSet<ObjectMetadata>
- Overrides:
hashCode
in classAbstractSet<ObjectMetadata>
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceCollection<ObjectMetadata>
- Specified by:
equals
in interfaceSet<ObjectMetadata>
- Overrides:
equals
in classAbstractSet<ObjectMetadata>
-
-