-
- All Implemented Interfaces:
-
kotlin.collections.Iterable
public interface BucketList implements Iterable<S3Bucket>
Collection of Buckets retrieved from an S3 store.
The contents of this BucketList are guaranteed to be in the order returned by the S3 API.
-
-
Method Summary
Modifier and Type Method Description abstract Map<BucketName, S3Bucket>toMap()Copies the contents of this BucketList into a map keyed on bucket names. abstract List<S3Bucket>toList()Copies the contents of this BucketList into a list. abstract Stream<S3Bucket>stream()Returns a stream over the contents of this BucketList. abstract S3Bucketget(BucketName name)Retrieves the bucket in this BucketList with the given name (if such a bucket exists). abstract S3Bucketget(Integer index)Returns the S3Bucket in this BucketList at the given index. abstract IntegergetSize()Count of buckets in this BucketList. abstract BooleanisEmpty()Whether this BucketList is empty. abstract BooleanisNotEmpty()Whether this BucketList is not empty. -
-
Method Detail
-
toMap
abstract Map<BucketName, S3Bucket> toMap()
Copies the contents of this BucketList into a map keyed on bucket names.
-
toList
abstract List<S3Bucket> toList()
Copies the contents of this BucketList into a list.
Bucket list will be in the order the buckets were returned from the S3 API.
-
stream
abstract Stream<S3Bucket> stream()
Returns a stream over the contents of this BucketList.
The contents of the stream will be in the order the buckets were returned from the S3 api.
-
get
abstract S3Bucket get(BucketName name)
Retrieves the bucket in this BucketList with the given name (if such a bucket exists).
-
get
abstract S3Bucket get(Integer index)
Returns the S3Bucket in this BucketList at the given index.
-
getSize
abstract Integer getSize()
Count of buckets in this BucketList.
-
isEmpty
abstract Boolean isEmpty()
Whether this BucketList is empty.
-
isNotEmpty
abstract Boolean isNotEmpty()
Whether this BucketList is not empty.
-
-
-
-