Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created November 22, 2019 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/8cccb3ac4682f446d14faef6902c2201 to your computer and use it in GitHub Desktop.
Save jasongorman/8cccb3ac4682f446d14faef6902c2201 to your computer and use it in GitHub Desktop.
void load(Parcel parcel){
execute(() -> parcels.add(parcel))
.when(() -> !isFull(), this);
}
Parcel unload(){
return execute(() -> parcels.remove(parcels.size() - 1))
.when(() -> !parcels.isEmpty(), this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment