diff options
author | Pierre Lecesne <lecesne@google.com> | 2018-01-25 23:03:17 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-01-25 23:03:17 +0000 |
commit | 88c09956ea714c33205adf29c39bbdf6d835503c (patch) | |
tree | 5fbedf18b13f0f6071c7f4010d47796a17ede2f5 | |
parent | 284179bb891708644d4b05b1488dad4c3f97be61 (diff) | |
parent | 685081fc8d33b365f765ba9a80d9b471d0000fb6 (diff) | |
download | apkzlib-88c09956ea714c33205adf29c39bbdf6d835503c.tar.gz |
Merge "Make ZFileOptions setters return "this" for easier chaining." into studio-master-dev am: fe8a72b490 am: b42956b73d
am: 685081fc8d
Change-Id: I9b10109b3b755e39def10e7d7ccd96fc4aff0662
-rw-r--r-- | src/main/java/com/android/apkzlib/zip/ZFileOptions.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/main/java/com/android/apkzlib/zip/ZFileOptions.java b/src/main/java/com/android/apkzlib/zip/ZFileOptions.java index 3d28d81..08a1d83 100644 --- a/src/main/java/com/android/apkzlib/zip/ZFileOptions.java +++ b/src/main/java/com/android/apkzlib/zip/ZFileOptions.java @@ -105,8 +105,9 @@ public class ZFileOptions { * * @param compressor the compressor */ - public void setCompressor(@Nonnull Compressor compressor) { + public ZFileOptions setCompressor(@Nonnull Compressor compressor) { this.compressor = compressor; + return this; } /** @@ -123,8 +124,9 @@ public class ZFileOptions { * * @param noTimestamps should timestamps be zeroed? */ - public void setNoTimestamps(boolean noTimestamps) { + public ZFileOptions setNoTimestamps(boolean noTimestamps) { this.noTimestamps = noTimestamps; + return this; } /** @@ -142,8 +144,9 @@ public class ZFileOptions { * * @param alignmentRule the alignment rule */ - public void setAlignmentRule(@Nonnull AlignmentRule alignmentRule) { + public ZFileOptions setAlignmentRule(@Nonnull AlignmentRule alignmentRule) { this.alignmentRule = alignmentRule; + return this; } /** @@ -162,8 +165,9 @@ public class ZFileOptions { * * @param coverEmptySpaceUsingExtraField should the extra field be used to cover empty spaces? */ - public void setCoverEmptySpaceUsingExtraField(boolean coverEmptySpaceUsingExtraField) { + public ZFileOptions setCoverEmptySpaceUsingExtraField(boolean coverEmptySpaceUsingExtraField) { this.coverEmptySpaceUsingExtraField = coverEmptySpaceUsingExtraField; + return this; } /** @@ -177,13 +181,14 @@ public class ZFileOptions { } /** - * Sets whether files should be automatically sorted before updating the zip file. See - * {@link ZFile} for an explanation on automatic sorting. + * Sets whether files should be automatically sorted before updating the zip file. See {@link + * ZFile} for an explanation on automatic sorting. * * @param autoSortFiles should the file be automatically sorted? */ - public void setAutoSortFiles(boolean autoSortFiles) { + public ZFileOptions setAutoSortFiles(boolean autoSortFiles) { this.autoSortFiles = autoSortFiles; + return this; } /** @@ -191,8 +196,9 @@ public class ZFileOptions { * * @param verifyLogFactory verification log factory */ - public void setVerifyLogFactory(@Nonnull Supplier<VerifyLog> verifyLogFactory) { + public ZFileOptions setVerifyLogFactory(@Nonnull Supplier<VerifyLog> verifyLogFactory) { this.verifyLogFactory = verifyLogFactory; + return this; } /** |