Created
April 1, 2014 20:19
-
-
Save rtannenbaum/9922296 to your computer and use it in GitHub Desktop.
"mutable" fields
This file contains 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 | |
public abstract class Item | |
{ | |
public static Item create(String sku, String barcode, boolean backup, boolean removed, | |
int external_srr, int external_rb) { | |
return new AutoValue_Item(sku, barcode, backup, removed, external_srr, external_rb); | |
} | |
public abstract String sku(); | |
public abstract String barcode(); | |
public Item withBarcode(String newBarcode) { | |
return new AutoValue_Item(sku(), newBarcode, backup(), removed(), external_srr_reservation_id(), external_rb_reservation_id()); | |
} | |
public abstract boolean backup(); | |
public abstract boolean removed(); | |
public abstract int external_srr_reservation_id(); | |
public abstract int external_rb_reservation_id(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment