Substitute calculator events with Otto bus events
This commit is contained in:
@@ -6,7 +6,7 @@ import org.solovyev.common.msg.Message;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class CustomFunctionCalculationException extends AbstractJsclArithmeticException {
|
||||
public class CustomFunctionCalculationException extends JsclArithmeticException {
|
||||
|
||||
public CustomFunctionCalculationException(@Nonnull CustomFunction function, @Nonnull Message message) {
|
||||
super(Messages.msg_19, function.getName(), message);
|
||||
|
@@ -9,19 +9,15 @@ import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public abstract class AbstractJsclArithmeticException extends ArithmeticException implements Message {
|
||||
public abstract class JsclArithmeticException extends ArithmeticException implements Message {
|
||||
|
||||
@Nonnull
|
||||
private final Message message;
|
||||
|
||||
public AbstractJsclArithmeticException(@Nonnull String messageCode, Object... parameters) {
|
||||
public JsclArithmeticException(@Nonnull String messageCode, Object... parameters) {
|
||||
this.message = new JsclMessage(messageCode, MessageType.error, parameters);
|
||||
}
|
||||
|
||||
public AbstractJsclArithmeticException(@Nonnull Message message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public String getMessageCode() {
|
||||
return this.message.getMessageCode();
|
||||
@@ -53,10 +49,9 @@ public abstract class AbstractJsclArithmeticException extends ArithmeticExceptio
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
AbstractJsclArithmeticException that = (AbstractJsclArithmeticException) o;
|
||||
JsclArithmeticException that = (JsclArithmeticException) o;
|
||||
|
||||
return message.equals(that.message);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
@@ -2,7 +2,7 @@ package jscl;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class NotSupportedException extends AbstractJsclArithmeticException {
|
||||
public class NotSupportedException extends JsclArithmeticException {
|
||||
|
||||
public NotSupportedException(@Nonnull String messageCode, Object... parameters) {
|
||||
super(messageCode, parameters);
|
||||
|
@@ -4,7 +4,7 @@ import jscl.text.msg.Messages;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class NumeralBaseException extends AbstractJsclArithmeticException {
|
||||
public class NumeralBaseException extends JsclArithmeticException {
|
||||
|
||||
public NumeralBaseException(@Nonnull Double value) {
|
||||
super(Messages.msg_17, value);
|
||||
|
@@ -1,11 +1,11 @@
|
||||
package jscl.math;
|
||||
|
||||
import jscl.AbstractJsclArithmeticException;
|
||||
import jscl.JsclArithmeticException;
|
||||
import jscl.text.msg.Messages;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class NotIntegrableException extends AbstractJsclArithmeticException {
|
||||
public class NotIntegrableException extends JsclArithmeticException {
|
||||
|
||||
public NotIntegrableException(@Nonnull String messageCode, Object... parameters) {
|
||||
super(messageCode, parameters);
|
||||
|
Reference in New Issue
Block a user