Substitute calculator events with Otto bus events

This commit is contained in:
serso
2016-02-01 22:27:07 +01:00
parent 9c5652def0
commit 8c56dd1083
23 changed files with 218 additions and 502 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);