Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style changes #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/net/objecthunter/exp4j/Expression.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/objecthunter/exp4j/ValidationResult.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,7 +34,7 @@ public class ShuntingYard {
* @param userFunctions the custom functions used
* @param userOperators the custom operators used
* @param variableNames the variable names used in the expression
* @param implicitMultiplication set to fasle to turn off implicit multiplication
* @param implicitMultiplication set to false to turn off implicit multiplication
* @return a {@link net.objecthunter.exp4j.tokenizer.Token} array containing the result
*/
public static Token[] convertToRPN(final String expression, final Map<String, Function> userFunctions,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,12 +16,12 @@
package net.objecthunter.exp4j.tokenizer;

/**
* represents closed parentheses
* Represents closed parentheses
*/
class CloseParenthesesToken extends Token {

/**
* Creare a new instance
* Create a new instance
*/
CloseParenthesesToken() {
super(Token.TOKEN_PARENTHESES_CLOSE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,8 +17,10 @@

import net.objecthunter.exp4j.function.Function;

public class FunctionToken extends Token{
public class FunctionToken extends Token {

private final Function function;

public FunctionToken(final Function function) {
super(Token.TOKEN_FUNCTION);
this.function = function;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
*/
package net.objecthunter.exp4j.tokenizer;

class OpenParenthesesToken extends Token{
class OpenParenthesesToken extends Token {

OpenParenthesesToken() {
super(TOKEN_PARENTHESES_OPEN);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/objecthunter/exp4j/tokenizer/Token.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/net/objecthunter/exp4j/tokenizer/Tokenizer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
/*
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -86,7 +86,7 @@ public Token nextToken(){
}
return parseNumberToken(ch);
} else if (isArgumentSeparator(ch)) {
return parseArgumentSeparatorToken(ch);
return parseArgumentSeparatorToken();
} else if (isOpenParentheses(ch)) {
if (lastToken != null && implicitMultiplication &&
(lastToken.getType() != Token.TOKEN_OPERATOR
Expand Down Expand Up @@ -119,7 +119,7 @@ public Token nextToken(){
throw new IllegalArgumentException("Unable to parse char '" + ch + "' (Code:" + (int) ch + ") at [" + pos + "]");
}

private Token parseArgumentSeparatorToken(char ch) {
private Token parseArgumentSeparatorToken() {
this.pos++;
this.lastToken = new ArgumentSeparatorToken();
return lastToken;
Expand Down Expand Up @@ -207,7 +207,7 @@ private Token parseOperatorToken(char firstChar) {
Operator op = this.getOperator(symbol.toString());
if (op == null) {
symbol.setLength(symbol.length() - 1);
}else{
} else {
lastValid = op;
break;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,6 +19,7 @@
* represents a setVariable used in an expression
*/
public class VariableToken extends Token {

private final String name;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/net/objecthunter/exp4j/ConcurrencyTests.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Frank Asseg
* Copyright 2019 Frank Asseg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,7 +57,7 @@ public void testFutureEvaluation() throws Exception {
.evaluateAsync(exec);
}

for (int i = 0; i< numTests;i++) {
for (int i = 0; i < numTests; i++) {
assertEquals(correct1[i], (Double) results1[i].get(), 0d);
assertEquals(correct2[i], (Double) results2[i].get(), 0d);
}
Expand Down
Loading