Workaround for "FindObject" in Object Class

Ok, few notes:

  1. enum is not an object, so findobject wont work.
  2. if i understand correctly, in your constructor you want to set your variable "type"and “amount”. Not assign your constructor variables to whichever the default values are for type and amount.
  3. when setting “type” correctly in your constructor, you can just use this same “type” variable as your class’ enum.