improved @author mark
This commit is contained in:
@@ -15,7 +15,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Batch calculator (reads input from a file)
|
* Batch calculator (reads input from a file)
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class CalculatorBatch implements Runnable {
|
public class CalculatorBatch implements Runnable {
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Interactive calculator
|
* Interactive calculator
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class CalculatorInteractive implements Runnable {
|
public class CalculatorInteractive implements Runnable {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import java.io.File;
|
|||||||
/**
|
/**
|
||||||
* Application main class
|
* Application main class
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import net.mightypork.rcalc.RCalc;
|
|||||||
/**
|
/**
|
||||||
* RCalc unit tests
|
* RCalc unit tests
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class Tests implements Runnable {
|
public class Tests implements Runnable {
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ package net.mightypork.rcalc;
|
|||||||
/**
|
/**
|
||||||
* Interface for classes with optional debug mode
|
* Interface for classes with optional debug mode
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public interface IDebugable {
|
public interface IDebugable {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Interface of an object that can be turned into a fractional value
|
* Interface of an object that can be turned into a fractional value
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public interface IEvaluable {
|
public interface IEvaluable {
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ package net.mightypork.rcalc;
|
|||||||
/**
|
/**
|
||||||
* Evaluable token interface
|
* Evaluable token interface
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public interface IEvaluableToken extends IEvaluable, IToken {
|
public interface IEvaluableToken extends IEvaluable, IToken {
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ package net.mightypork.rcalc;
|
|||||||
/**
|
/**
|
||||||
* Token interface
|
* Token interface
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public interface IToken {
|
public interface IToken {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ package net.mightypork.rcalc;
|
|||||||
/**
|
/**
|
||||||
* Error thrown when a syntax error is encountered while parsing an expression
|
* Error thrown when a syntax error is encountered while parsing an expression
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class ParseError extends RuntimeException {
|
public class ParseError extends RuntimeException {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
* Rational calculator, expression parser returning fractional results instead
|
* Rational calculator, expression parser returning fractional results instead
|
||||||
* of imprecise decimal values.
|
* of imprecise decimal values.
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class RCalc implements IDebugable {
|
public class RCalc implements IDebugable {
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
* Rational Calculator Session - interactive RCalc with possibility to set and
|
* Rational Calculator Session - interactive RCalc with possibility to set and
|
||||||
* use variables.
|
* use variables.
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class RCalcSession implements IDebugable {
|
public class RCalcSession implements IDebugable {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import net.mightypork.rcalc.tokens.*;
|
|||||||
/**
|
/**
|
||||||
* A list of tokens which can be parsed into a single IEvaluable
|
* A list of tokens which can be parsed into a single IEvaluable
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenList extends ArrayList<IToken> implements IToken {
|
public class TokenList extends ArrayList<IToken> implements IToken {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import net.mightypork.rcalc.tokens.*;
|
|||||||
/**
|
/**
|
||||||
* Utility for converting an expression from String to a list of tokens
|
* Utility for converting an expression from String to a list of tokens
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class Tokenizer implements IDebugable {
|
public class Tokenizer implements IDebugable {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import net.mightypork.rcalc.TokenList;
|
|||||||
/**
|
/**
|
||||||
* A fractional number with methods for basic arithmetics
|
* A fractional number with methods for basic arithmetics
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class Fraction implements IEvaluableToken {
|
public class Fraction implements IEvaluableToken {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Abstract operation with two operands
|
* Abstract operation with two operands
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public abstract class BinaryOperation extends Operation {
|
public abstract class BinaryOperation extends Operation {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Abstract operation
|
* Abstract operation
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public abstract class Operation implements IEvaluableToken {
|
public abstract class Operation implements IEvaluableToken {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Addition
|
* Addition
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class OperationAdd extends BinaryOperation {
|
public class OperationAdd extends BinaryOperation {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Division
|
* Division
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class OperationDivide extends BinaryOperation {
|
public class OperationDivide extends BinaryOperation {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Factorial
|
* Factorial
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class OperationFactorial extends UnaryOperation {
|
public class OperationFactorial extends UnaryOperation {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Modulo
|
* Modulo
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class OperationModulo extends BinaryOperation {
|
public class OperationModulo extends BinaryOperation {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Multiplication
|
* Multiplication
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class OperationMultiply extends BinaryOperation {
|
public class OperationMultiply extends BinaryOperation {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Exponentiation
|
* Exponentiation
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class OperationPower extends BinaryOperation {
|
public class OperationPower extends BinaryOperation {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Subtraction
|
* Subtraction
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class OperationSubtract extends BinaryOperation {
|
public class OperationSubtract extends BinaryOperation {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.numbers.Fraction;
|
|||||||
/**
|
/**
|
||||||
* Abstract unary operator
|
* Abstract unary operator
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public abstract class UnaryOperation extends Operation {
|
public abstract class UnaryOperation extends Operation {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import net.mightypork.rcalc.IToken;
|
|||||||
/**
|
/**
|
||||||
* Interface of an operator token
|
* Interface of an operator token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public interface IOperatorToken extends IToken {
|
public interface IOperatorToken extends IToken {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.operations.Operation;
|
|||||||
/**
|
/**
|
||||||
* Abstract operation token with two operands
|
* Abstract operation token with two operands
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public abstract class TokenBinaryOperator extends TokenOperator {
|
public abstract class TokenBinaryOperator extends TokenOperator {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.mightypork.rcalc.operations.OperationAdd;
|
|||||||
/**
|
/**
|
||||||
* Addition token
|
* Addition token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenOperatorAdd extends TokenBinaryOperator {
|
public class TokenOperatorAdd extends TokenBinaryOperator {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.mightypork.rcalc.operations.OperationDivide;
|
|||||||
/**
|
/**
|
||||||
* Division token
|
* Division token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenOperatorDivide extends TokenBinaryOperator {
|
public class TokenOperatorDivide extends TokenBinaryOperator {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.mightypork.rcalc.operations.OperationFactorial;
|
|||||||
/**
|
/**
|
||||||
* Factorial token
|
* Factorial token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenOperatorFactorial extends TokenUnaryOperatorLeft {
|
public class TokenOperatorFactorial extends TokenUnaryOperatorLeft {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.mightypork.rcalc.operations.OperationModulo;
|
|||||||
/**
|
/**
|
||||||
* Modulo token
|
* Modulo token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenOperatorModulo extends TokenBinaryOperator {
|
public class TokenOperatorModulo extends TokenBinaryOperator {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.mightypork.rcalc.operations.OperationMultiply;
|
|||||||
/**
|
/**
|
||||||
* Multiplication token
|
* Multiplication token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenOperatorMultiply extends TokenBinaryOperator {
|
public class TokenOperatorMultiply extends TokenBinaryOperator {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.mightypork.rcalc.operations.OperationPower;
|
|||||||
/**
|
/**
|
||||||
* Exponentiation token
|
* Exponentiation token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenOperatorPower extends TokenBinaryOperator {
|
public class TokenOperatorPower extends TokenBinaryOperator {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.mightypork.rcalc.operations.OperationSubtract;
|
|||||||
/**
|
/**
|
||||||
* Subtraction token
|
* Subtraction token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenOperatorSubtract extends TokenBinaryOperator {
|
public class TokenOperatorSubtract extends TokenBinaryOperator {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.TokenList;
|
|||||||
/**
|
/**
|
||||||
* Left parenthesis token
|
* Left parenthesis token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenParenthesisLeft implements IToken {
|
public class TokenParenthesisLeft implements IToken {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.TokenList;
|
|||||||
/**
|
/**
|
||||||
* Right parenthesis token
|
* Right parenthesis token
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public class TokenParenthesisRight implements IToken {
|
public class TokenParenthesisRight implements IToken {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.operations.Operation;
|
|||||||
/**
|
/**
|
||||||
* Abstract operator token with one operand on left
|
* Abstract operator token with one operand on left
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public abstract class TokenUnaryOperatorLeft extends TokenOperator {
|
public abstract class TokenUnaryOperatorLeft extends TokenOperator {
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.mightypork.rcalc.operations.Operation;
|
|||||||
/**
|
/**
|
||||||
* Abstract operator token with one operand on right
|
* Abstract operator token with one operand on right
|
||||||
*
|
*
|
||||||
* @author Ondrej Hruska
|
* @author Ondřej Hruška (MightyPork)
|
||||||
*/
|
*/
|
||||||
public abstract class TokenUnaryOperatorRight extends TokenOperator {
|
public abstract class TokenUnaryOperatorRight extends TokenOperator {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user