From: <jom...@us...> - 2013-11-23 14:28:37
|
Revision: 1761 http://sourceforge.net/p/jason/svn/1761 Author: jomifred Date: 2013-11-23 14:28:34 +0000 (Sat, 23 Nov 2013) Log Message: ----------- rename class Modified Paths: -------------- trunk/src/jason/asSyntax/ArithFunctionTerm.java trunk/src/jason/asSyntax/Atom.java trunk/src/jason/asSyntax/NumberTerm.java trunk/src/jason/asSyntax/VarTerm.java Added Paths: ----------- trunk/src/jason/NoValueException.java Removed Paths: ------------- trunk/src/jason/NoValueForVarException.java Copied: trunk/src/jason/NoValueException.java (from rev 1760, trunk/src/jason/NoValueForVarException.java) =================================================================== --- trunk/src/jason/NoValueException.java (rev 0) +++ trunk/src/jason/NoValueException.java 2013-11-23 14:28:34 UTC (rev 1761) @@ -0,0 +1,44 @@ +//---------------------------------------------------------------------------- +// Copyright (C) 2003 Rafael H. Bordini, Jomi F. Hubner, et al. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// To contact the authors: +// http://www.inf.ufrgs.br/~bordini +// http://www.das.ufsc.br/~jomi +// +//---------------------------------------------------------------------------- + + +package jason; + + +public class NoValueException extends JasonException { + + private static final long serialVersionUID = 1L; + + public NoValueException() { + } + + public NoValueException(String msg) { + super(msg); + } + + public NoValueException(String msg, Exception cause) { + super(msg); + initCause(cause); + } + +} Deleted: trunk/src/jason/NoValueForVarException.java =================================================================== --- trunk/src/jason/NoValueForVarException.java 2013-11-22 17:16:43 UTC (rev 1760) +++ trunk/src/jason/NoValueForVarException.java 2013-11-23 14:28:34 UTC (rev 1761) @@ -1,44 +0,0 @@ -//---------------------------------------------------------------------------- -// Copyright (C) 2003 Rafael H. Bordini, Jomi F. Hubner, et al. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// To contact the authors: -// http://www.inf.ufrgs.br/~bordini -// http://www.das.ufsc.br/~jomi -// -//---------------------------------------------------------------------------- - - -package jason; - - -public class NoValueForVarException extends JasonException { - - private static final long serialVersionUID = 1L; - - public NoValueForVarException() { - } - - public NoValueForVarException(String msg) { - super(msg); - } - - public NoValueForVarException(String msg, Exception cause) { - super(msg); - initCause(cause); - } - -} Modified: trunk/src/jason/asSyntax/ArithFunctionTerm.java =================================================================== --- trunk/src/jason/asSyntax/ArithFunctionTerm.java 2013-11-22 17:16:43 UTC (rev 1760) +++ trunk/src/jason/asSyntax/ArithFunctionTerm.java 2013-11-23 14:28:34 UTC (rev 1761) @@ -1,6 +1,6 @@ package jason.asSyntax; -import jason.NoValueForVarException; +import jason.NoValueException; import jason.asSemantics.Agent; import jason.asSemantics.ArithFunction; import jason.asSemantics.Unifier; @@ -91,7 +91,7 @@ try { value = new NumberTermImpl(function.evaluate((agent == null ? null : agent.getTS()), ((Literal)v).getTermsArray())); return value; - } catch (NoValueForVarException e) { + } catch (NoValueException e) { // ignore and return this; } catch (Exception e) { logger.log(Level.SEVERE, getErrorMsg()+ " -- error in evaluate!", e); @@ -103,12 +103,11 @@ return clone(); } - @Override - public double solve() throws NoValueForVarException { + public double solve() throws NoValueException { if (value == null) // try to solve without unifier capply(null); if (value == null) - throw new NoValueForVarException(); + throw new NoValueException(); else return value.solve(); } Modified: trunk/src/jason/asSyntax/Atom.java =================================================================== --- trunk/src/jason/asSyntax/Atom.java 2013-11-22 17:16:43 UTC (rev 1760) +++ trunk/src/jason/asSyntax/Atom.java 2013-11-23 14:28:34 UTC (rev 1761) @@ -41,7 +41,7 @@ public Atom(String functor) { if (functor == null) - logger.log(Level.WARNING, "A structure functor should not be null!", new Exception()); + logger.log(Level.WARNING, "An atom functor should not be null!", new Exception()); this.functor = functor; } Modified: trunk/src/jason/asSyntax/NumberTerm.java =================================================================== --- trunk/src/jason/asSyntax/NumberTerm.java 2013-11-22 17:16:43 UTC (rev 1760) +++ trunk/src/jason/asSyntax/NumberTerm.java 2013-11-23 14:28:34 UTC (rev 1761) @@ -1,6 +1,6 @@ package jason.asSyntax; -import jason.NoValueForVarException; +import jason.NoValueException; /** The interface for numeric terms of AgentSpeak language @@ -10,5 +10,5 @@ public interface NumberTerm extends Term { /** returns the numeric value of the term */ - public double solve() throws NoValueForVarException; + public double solve() throws NoValueException; } Modified: trunk/src/jason/asSyntax/VarTerm.java =================================================================== --- trunk/src/jason/asSyntax/VarTerm.java 2013-11-22 17:16:43 UTC (rev 1760) +++ trunk/src/jason/asSyntax/VarTerm.java 2013-11-23 14:28:34 UTC (rev 1761) @@ -23,7 +23,7 @@ package jason.asSyntax; -import jason.NoValueForVarException; +import jason.NoValueException; import jason.asSemantics.Agent; import jason.asSemantics.Unifier; import jason.asSyntax.parser.as2j; @@ -757,9 +757,8 @@ // Interface NumberTerm // ---------- - @Override - public double solve() throws NoValueForVarException { - throw new NoValueForVarException(); + public double solve() throws NoValueException { + throw new NoValueException(); /* if (value != null && value.isNumeric()) return ((NumberTerm) value).solve(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |