Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas
Created March 14, 2020 18:13
Show Gist options
  • Save PatilShreyas/084fae8381aa146f223480ca5feea51c to your computer and use it in GitHub Desktop.
Save PatilShreyas/084fae8381aa146f223480ca5feea51c to your computer and use it in GitHub Desktop.
public class Needs {
public Food mFood;
public Clothes mClothes;
public Shelter mShelter;
@Inject
public Needs(Food food, Clothes clothes, Shelter shelter) {
this.mFood = food;
this.mClothes = clothes;
this.mShelter = shelter;
}
public boolean fulfilled() {
return mFood != null && mClothes != null && mShelter != null && mFood.mMoney != null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment