Interface Farm


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

    • addPasture

      Pasture<ByteBuffer> addPasture(String herdName, PastureListener<ByteBuffer> pastureListener)
      Here we come to Farm with our Pasture to graze specific Herd on it.
      Parameters:
      herdName - 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<Breed> addBreedingPasture(String herdName, Class<Breed> breedClass, PastureListener<Breed> pastureListener)
      Here we come to Farm with our Pasture to graze specific Breeding Herd on it.
      Parameters:
      herdName - 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