com.amazonaws.services.s3.iterable

## クラス S3Versions

- java.lang.Object
- - com.amazonaws.services.s3.iterable.S3Versions

- すべての実装されたインタフェース:
    java.lang.Iterable<S3VersionSummary>

      public class S3Versions
      extends java.lang.Object
      implements java.lang.Iterable<S3VersionSummary>

  Provides an easy way to iterate Amazon S3 object versions in a "foreach" statement. For example:

       for ( S3VersionSummary summary : S3Versions.forPrefix(s3, "my-bucket", "photos/") ) {
           System.out.printf("Version '%s' of key '%s'\n", summary.getVersionId(), summary.getKey());
       }

  The list of `S3VersionSummary`s will be fetched lazily, a page at a time, as they are needed. The size of the page can be controlled with the `withBatchSize(int)` method.

- - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `static S3Versions` | `forKey(AmazonS3 s3, java.lang.String bucketName, java.lang.String key)` Constructs an iterable that covers the versions of a single Amazon S3 object.
    `java.lang.Integer` | `getBatchSize()`
    `java.lang.String` | `getBucketName()`
    `java.lang.String` | `getKey()`
    `java.lang.String` | `getPrefix()`
    `AmazonS3` | `getS3()`
    `static S3Versions` | `inBucket(AmazonS3 s3, java.lang.String bucketName)` Constructs an iterable that covers all the object versions in an Amazon S3 bucket.
    `java.util.Iterator<S3VersionSummary>` | `iterator()`
    `S3Versions` | `withBatchSize(int batchSize)` Sets the batch size, i.e., how many `S3VersionSummary`s will be fetched at once.
    `static S3Versions` | `withPrefix(AmazonS3 s3, java.lang.String bucketName, java.lang.String prefix)` Constructs an iterable that covers the versions in an Amazon S3 bucket where the object key begins with the given prefix.

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### メソッドの詳細

    - #### inBucket

          public static S3Versions inBucket(AmazonS3 s3,
                            java.lang.String bucketName)

      Constructs an iterable that covers all the object versions in an Amazon S3 bucket.
      パラメータ:
        `s3` - The Amazon S3 client.
        `bucketName` - The bucket name.
      戻り値:
        An iterator for object version summaries.

    - #### withPrefix

          public static S3Versions withPrefix(AmazonS3 s3,
                              java.lang.String bucketName,
                              java.lang.String prefix)

      Constructs an iterable that covers the versions in an Amazon S3 bucket where the object key begins with the given prefix.
      パラメータ:
        `s3` - The Amazon S3 client.
        `bucketName` - The bucket name.
        `prefix` - The prefix.
      戻り値:
        An iterator for object version summaries.

    - #### forKey

          public static S3Versions forKey(AmazonS3 s3,
                          java.lang.String bucketName,
                          java.lang.String key)

      Constructs an iterable that covers the versions of a single Amazon S3 object.
      パラメータ:
        `s3` - The Amazon S3 client.
        `bucketName` - The bucket name.
        `key` - The key.
      戻り値:
        An iterator for object version summaries.

    - #### withBatchSize

          public S3Versions withBatchSize(int batchSize)

      Sets the batch size, i.e., how many `S3VersionSummary`s will be fetched at once.
      パラメータ:
        `batchSize` - How many object summaries to fetch at once.

    - #### getBatchSize

          public java.lang.Integer getBatchSize()

    - #### getPrefix

          public java.lang.String getPrefix()

    - #### getKey

          public java.lang.String getKey()

    - #### getS3

          public AmazonS3 getS3()

    - #### getBucketName

          public java.lang.String getBucketName()

    - #### iterator

          public java.util.Iterator<S3VersionSummary> iterator()

      定義:
        `iterator` インタフェース内 `java.lang.Iterable<S3VersionSummary>`