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