001    /*
002     * $Id: MonoidFactory.java 1259 2007-07-29 10:18:54Z kredel $
003     */
004    
005    package edu.jas.structure;
006    
007    
008    /**
009     * Monoid factory interface.
010     * Defines get one and tests for associativity and commutativity.
011     * @author Heinz Kredel
012     */
013    
014    public interface MonoidFactory<C extends MonoidElem<C>> 
015                     extends ElemFactory<C> {
016    
017    
018        /**
019         * Get the constant one for the MonoidElem.
020         * @return 1.
021         */
022        public C getONE();
023    
024    
025        /**
026         * Query if this monoid is commutative.
027         * @return true if this monoid is commutative, else false.
028         */
029        public boolean isCommutative();
030    
031    
032        /**
033         * Query if this ring is associative.
034         * @return true if this monoid is associative, else false.
035         */
036        public boolean isAssociative();
037    
038    
039    }