Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
"mutable" fields
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
You can’t perform that action at this time.