From: <jom...@us...> - 2012-07-02 14:19:10
|
Revision: 1698 http://jason.svn.sourceforge.net/jason/?rev=1698&view=rev Author: jomifred Date: 2012-07-02 14:18:59 +0000 (Mon, 02 Jul 2012) Log Message: ----------- include clone() in IndexedBB Modified Paths: -------------- trunk/src/jason/architecture/AgArch.java trunk/src/jason/bb/ChainBB.java trunk/src/jason/bb/ChainBBAdapter.java trunk/src/jason/bb/IndexedBB.java Modified: trunk/src/jason/architecture/AgArch.java =================================================================== --- trunk/src/jason/architecture/AgArch.java 2012-06-15 17:47:19 UTC (rev 1697) +++ trunk/src/jason/architecture/AgArch.java 2012-07-02 14:18:59 UTC (rev 1698) @@ -50,7 +50,7 @@ * Each member of the chain is a subclass of AgArch. The last arch in the chain is the infrastructure tier (Centralised, JADE, Saci, ...). * The getUserAgArch method returns the first arch in the chain. * - * Users can customise the architecture by overriding some this class methods. + * Users can customise the architecture by overriding some methods of this class. */ public class AgArch implements AgArchInfraTier { @@ -250,7 +250,7 @@ return successor == null || successor.isRunning(); } - /** sets the number of the current cycle in the sync execution mode */ + /** sets the number of the current cycle */ public void setCycleNumber(int cycle) { cycleNumber = cycle; if (successor != null) @@ -261,7 +261,7 @@ setCycleNumber(cycleNumber+1); } - /** gets the current cycle number in case of running in sync execution mode */ + /** gets the current cycle number */ public int getCycleNumber() { return cycleNumber; } Modified: trunk/src/jason/bb/ChainBB.java =================================================================== --- trunk/src/jason/bb/ChainBB.java 2012-06-15 17:47:19 UTC (rev 1697) +++ trunk/src/jason/bb/ChainBB.java 2012-07-02 14:18:59 UTC (rev 1698) @@ -19,7 +19,7 @@ * * jason.bb.ChainBB( bb1, bb2, bb3, ... ) * - * where each BB is bbclass(bb paramters) + * where each BB is bbclass(bb parameters) * * e.g.: * <pre> @@ -76,7 +76,7 @@ } } - @SuppressWarnings("unchecked") + @SuppressWarnings("rawtypes") public List<Class> getChainClasses() { List<Class> r = new ArrayList<Class>(); ChainBBAdapter c = getNextAdapter(); Modified: trunk/src/jason/bb/ChainBBAdapter.java =================================================================== --- trunk/src/jason/bb/ChainBBAdapter.java 2012-06-15 17:47:19 UTC (rev 1697) +++ trunk/src/jason/bb/ChainBBAdapter.java 2012-07-02 14:18:59 UTC (rev 1698) @@ -52,7 +52,7 @@ */ @SuppressWarnings("deprecation") -public class ChainBBAdapter implements BeliefBase { +public abstract class ChainBBAdapter implements BeliefBase { protected BeliefBase nextBB = null; // the next BB in the chain Modified: trunk/src/jason/bb/IndexedBB.java =================================================================== --- trunk/src/jason/bb/IndexedBB.java 2012-06-15 17:47:19 UTC (rev 1697) +++ trunk/src/jason/bb/IndexedBB.java 2012-07-02 14:18:59 UTC (rev 1698) @@ -88,6 +88,13 @@ remove(linbb); } } - return nextBB.add(bel); + return super.add(bel); } + + @Override + public BeliefBase clone() { + IndexedBB nbb = new IndexedBB(nextBB.clone()); + nbb.indexedBels = new HashMap<String,Structure>(this.indexedBels); + return nbb; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |