summaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorPierre Lecesne <lecesne@google.com>2017-03-23 16:25:45 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-23 16:25:45 +0000
commitb42956b73d85ce5d41087450f53c09be7b137683 (patch)
tree5fbedf18b13f0f6071c7f4010d47796a17ede2f5 /src/main/java/com
parente4e86dde0d9795a5e598b7ef55c49fa913aaa736 (diff)
parent84b8785e916f59976f73abc397b0af5f86d3db2b (diff)
downloadapkzlib-b42956b73d85ce5d41087450f53c09be7b137683.tar.gz
Merge "Make ZFileOptions setters return "this" for easier chaining." into studio-master-dev
am: fe8a72b490 Change-Id: I8c342193ac8b76f0870e21a927b9b2e874d72e64
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/android/apkzlib/zip/ZFileOptions.java22
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;
}
/**