1
2
3
4
5
6 package gov.nist.secauto.metaschema.core.metapath.cst;
7
8 import gov.nist.secauto.metaschema.core.metapath.ISequence;
9 import gov.nist.secauto.metaschema.core.metapath.TypeMetapathException;
10 import gov.nist.secauto.metaschema.core.metapath.function.library.FnData;
11 import gov.nist.secauto.metaschema.core.metapath.item.atomic.IAnyAtomicItem;
12
13 import edu.umd.cs.findbugs.annotations.NonNull;
14 import edu.umd.cs.findbugs.annotations.Nullable;
15
16 public abstract class AbstractExpression implements IExpression {
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 @Nullable
32 public static IAnyAtomicItem getFirstDataItem(@NonNull ISequence<?> sequence,
33 boolean requireSingleton) {
34 return FnData.fnData(sequence).getFirstItem(requireSingleton);
35 }
36
37 @Override
38 public String toString() {
39 return CSTPrinter.toString(this);
40 }
41 }