Created
March 15, 2017 11:49
-
-
Save relict007/6321deba942d2f52c743da111ecada96 to your computer and use it in GitHub Desktop.
AutoValue with builder and an immutable list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@AutoValue.Builder | |
public abstract static class Builder { | |
public abstract List<String> list(); | |
public abstract Builder setList(List<String> list); | |
abstract ListContainer autoBuild(); | |
public ListContainer build() { | |
setList(ImmutableList.copyOf(list())); | |
return autoBuild(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check urls:
google/auto#203