public class AnnotationList extends java.lang.Object implements java.lang.Iterable<Annotation>
Modifier and Type | Field and Description |
---|---|
static AnnotationList |
EMPTY
An empty annotation list
|
Constructor and Description |
---|
AnnotationList(java.util.List<Annotation> list) |
Modifier and Type | Method and Description |
---|---|
void |
check(Configuration config,
java.lang.String where)
Check an annotation list for internal consistency (e.g.
|
boolean |
equals(java.lang.Object other) |
AnnotationList |
filterByNamespace(java.lang.String ns)
Filter the annotation list by the namespace URI part of the annotation name
|
Annotation |
get(int i)
Get the i'th annotation in the list (counting from zero)
|
int |
hashCode() |
boolean |
includes(java.lang.String localName)
Ask whether a list of annotations contains an annotation with a given local name
|
boolean |
includes(StructuredQName name)
Ask whether a list of annotations contains an annotation with a given name
|
boolean |
isEmpty()
Ask whether the list of annotations is empty
|
java.util.Iterator<Annotation> |
iterator()
Returns an iterator over a set of elements of type T.
|
static AnnotationList |
singleton(Annotation ann)
Construct an annotation list containing a single annotation
|
int |
size()
The number of annotations in the list
|
public static AnnotationList EMPTY
public AnnotationList(java.util.List<Annotation> list)
public static AnnotationList singleton(Annotation ann)
ann
- the single annotation in the annotation listpublic void check(Configuration config, java.lang.String where) throws XPathException
where
- the context where the list appears: one of "DF" (declare function), "DV" (declare variable),
"IF" (inline function declaration), "FT" (function test)XPathException
- if the annotation list is not internally consistentpublic AnnotationList filterByNamespace(java.lang.String ns)
ns
- the namespace URI requiredpublic java.util.Iterator<Annotation> iterator()
iterator
in interface java.lang.Iterable<Annotation>
public boolean isEmpty()
public int size()
public Annotation get(int i)
i
- the index of the required annotation (counting from zero)public boolean includes(StructuredQName name)
name
- the given namepublic boolean includes(java.lang.String localName)
localName
- the given local namepublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.