Interface Farm


public interface Farm
Farm has many herds distributed evenly by pastures
  • Method Details

    • addPasture

      Pasture addPasture(Herd<ByteBuffer> herd, PastureListener<ByteBuffer> pastureListener)
      Here we come to Farm with our Pasture to graze specific Herd on it.
      Parameters:
      herd - Herd we want to inhabit this pasture
      pastureListener - Will listen for animals from Herd that will be assigned to our Pasture
      Returns:
      Shepherd allows to set Herd population
    • addBreedingPasture

      <Breed> Pasture addBreedingPasture(Herd<Breed> herd, Class<Breed> breedClass, PastureListener<Breed> pastureListener)
      Here we come to Farm with our Pasture to graze specific Breeding Herd on it.
      Parameters:
      herd - Herd we want to inhabit this pasture
      breedClass - Only elements of this class accepted in this herd
      pastureListener - Will listen for animals from Herd that will be assigned to our Pasture
      Returns:
      Shepherd allows to set Herd population