MCPcopy Create free account
hub / github.com/ChenSen5/api_autotest / MaxFunction

Class MaxFunction

src/main/java/com/sen/api/functions/MaxFunction.java:5–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import java.math.BigDecimal;
4
5public class MaxFunction implements Function{
6
7 @Override
8 public String execute(String[] args) {
9 BigDecimal maxValue=new BigDecimal(args[0]);
10 for(String numerial :args){
11 maxValue = maxValue.max(new BigDecimal(numerial));
12 }
13 return String.valueOf(maxValue);
14 }
15
16 @Override
17 public String getReferenceKey() {
18 // TODO Auto-generated method stub
19 return "max";
20 }
21
22}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected