Skip to content

Commit

Permalink
cbore: typo and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Jun 9, 2024
1 parent ad9a3f1 commit 0ec087c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/googlecode/aviator/AviatorEvaluator.java
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public static AviatorFunction removeOpFunction(final OperatorType opType) {


/**
* Check if the function is existed in aviator
* Check if the function exists in the global evaluator instance.
*
* @param name
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ public AviatorFunction removeOpFunction(final OperatorType opType) {
}

/**
* Check if the function is existed in evaluator. Note: it doesn't check the runtime defined
* Check if the function exists in the evaluator. Note: it doesn't check the runtime defined
* functions.
*
* @param name
Expand All @@ -1337,13 +1337,10 @@ public boolean containsFunction(final String name) {
boolean exists = this.funcMap.containsKey(name);
if (!exists && this.functionLoaders != null) {
for (FunctionLoader loader : this.functionLoaders) {
if (loader != null) {
if (loader.onFunctionNotFound(name) != null) {
exists = true;
break;
}
if (loader != null && loader.onFunctionNotFound(name) != null) {
exists = true;
break;
}

}
}

Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/googlecode/aviator/Expression.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
public interface Expression extends Serializable {

/**
* Execute expression with environment
* Execute an expression with an environment, returns the result.
*
* @param env Binding variable environment
* @return
* @return the result of execution
*/
Object execute(Map<String, Object> env);


/**
* Execute expression with empty environment
* Execute an expression with an empty environment, returns the result.
*
* @return
* @return the result of execution
*/
Object execute();

Expand All @@ -55,7 +55,7 @@ public interface Expression extends Serializable {

/**
* Returns this expression's all uninitialized global variable names in order when using
* AviatorEvaluator.EVAL mode,else returns an empty list.
* AviatorEvaluator.EVAL mode, otherwise returns an empty list.
*
* @see com.googlecode.aviator.AviatorEvaluator#EVAL
* @return
Expand All @@ -65,7 +65,7 @@ public interface Expression extends Serializable {

/**
* Returns this expression's all uninitialized global variable full names(contains dot) in order
* when using AviatorEvaluator.EVAL mode,else returns an empty list.
* when using AviatorEvaluator.EVAL mode, otherwise returns an empty list.
*
* @return
*/
Expand All @@ -90,8 +90,8 @@ public interface Expression extends Serializable {
String addSymbol(String name);

/**
* Returns the function names in the expression when using AviatorEvaluator.EVAL mode,else returns
* an empty list.
* Returns the function names in the expression when using AviatorEvaluator.EVAL mode, otherwise
* returns an empty list.
*
* @since 5.4.2
* @return the function name list
Expand Down

0 comments on commit 0ec087c

Please sign in to comment.