1
2
3
4
5
6 package gov.nist.secauto.metaschema.core.metapath.function;
7
8 import gov.nist.secauto.metaschema.core.qname.IEnhancedQName;
9
10 import java.util.List;
11
12 import edu.umd.cs.findbugs.annotations.NonNull;
13
14 abstract class AbstractFunction implements IFunction {
15 @NonNull
16 private final IEnhancedQName qname;
17 @NonNull
18 private final List<IArgument> arguments;
19
20 protected AbstractFunction(
21 @NonNull String name,
22 @NonNull String namespace,
23 @NonNull List<IArgument> arguments) {
24 this(IEnhancedQName.of(namespace, name), arguments);
25 }
26
27 protected AbstractFunction(
28 @NonNull IEnhancedQName qname,
29 @NonNull List<IArgument> arguments) {
30 this.qname = qname;
31 this.arguments = arguments;
32 }
33
34 @Override
35 public IEnhancedQName getQName() {
36 return qname;
37 }
38
39 @Override
40 public int arity() {
41 return arguments.size();
42 }
43
44 @Override
45 public List<IArgument> getArguments() {
46 return arguments;
47 }
48 }