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 booleanequals(Object obj)Set<String>getCommonPrefixes()Example:StringgetDelimiter()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.StringgetMarker()intgetMaxKeys()The maximum number of keys you'd like to see in the response body.StringgetName()name of the BucketStringgetNextMarker()Indicates where in the bucket to begin listing.StringgetPrefix()Limits the response to keys which begin with the indicated prefix.inthashCode()booleanisTruncated()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:
getCommonPrefixesin 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:
getDelimiterin interfaceListBucketResponse
-
getMarker
public String getMarker()
- Specified by:
getMarkerin 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:
getNextMarkerin 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:
getMaxKeysin 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:
getPrefixin interfaceListBucketResponse
-
isTruncated
public boolean isTruncated()
There are more then maxKeys available- Specified by:
isTruncatedin interfaceListBucketResponse
-
getName
public String getName()
name of the Bucket- Specified by:
getNamein interfaceListBucketResponse
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<ObjectMetadata>- Specified by:
hashCodein interfaceSet<ObjectMetadata>- Overrides:
hashCodein classAbstractSet<ObjectMetadata>
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceCollection<ObjectMetadata>- Specified by:
equalsin interfaceSet<ObjectMetadata>- Overrides:
equalsin classAbstractSet<ObjectMetadata>
-
-