001    package org.bukkit.entity;
002    
003    /**
004     * Represents an entity that can age and breed.
005     */
006    public interface Ageable extends Creature {    
007        /**
008         * Gets the age of this animal.
009         *
010         * @return Age
011         */
012        public int getAge();
013    
014        /**
015         * Sets the age of this animal.
016         *
017         * @param age New age
018         */
019        public void setAge(int age);
020    
021        /**
022         * Lock the age of the animal, setting this will prevent the animal from maturing or getting ready for mating.
023         *
024         * @param lock new lock
025         */
026        public void setAgeLock(boolean lock);
027    
028        /**
029         * Gets the current agelock.
030         *
031         * @return the current agelock
032         */
033        public boolean getAgeLock();
034    
035        /**
036         * Sets the age of the animal to a baby
037         */
038        public void setBaby();
039    
040        /**
041         * Sets the age of the animal to an adult
042         */
043        public void setAdult();
044    
045        /**
046         * Returns true if the animal is an adult.
047         *
048         * @return return true if the animal is an adult
049         */
050        public boolean isAdult();
051        
052        /**
053         * Return the ability to breed of the animal.
054         *
055         * @return the ability to breed of the animal
056         */
057        public boolean canBreed();
058    
059        /**
060         * Set breedability of the animal, if the animal is a baby and set to breed it will instantly grow up.
061         *
062         * @param breed breedability of the animal
063         */
064        public void setBreed(boolean breed);
065    }