public static final class Annotations.ArrayValueUnion extends java.lang.Object implements Annotations.Union
Constructor and Description |
---|
ArrayValueUnion() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(NodeHierarchicalVisitor nodeHierarchicalVisitor)
Accepts a
NodeHierarchicalVisitor . |
void |
addValue(Annotations.ElementValue value) |
Annotations.ArrayValueUnion |
copy() |
boolean |
equals(java.lang.Object object) |
int |
getLength() |
int |
getNumValues() |
java.util.List<Annotations.ElementValue> |
getValues() |
int |
hashCode() |
void |
removeValue(Annotations.ElementValue value) |
void |
write(java.io.DataOutput dataOutput) |
public Annotations.ArrayValueUnion copy()
copy
in interface Annotations.Union
public java.util.List<Annotations.ElementValue> getValues()
public boolean accept(NodeHierarchicalVisitor nodeHierarchicalVisitor)
Node
NodeHierarchicalVisitor
.
Returns the result of nodeHierarchicalVisitor.visitLeave(this)
.
If nodeHierarchicalVisitor
is null
, a NullPointerException
may be thrown. But no guarantees can be made for all implementations.
If a RuntimeException
is thrown by the current NodeHierarchicalVisitor
, a NodeTraversalException
may be thrown with the RuntimeException
wrapped. But no guarantees can be made for all implementations.
To implement this method, consider the following example:
if(nodeHierarchicalVisitor.visitEnter(this)) {
for(Node childNode : childNodes) {
if(!childNode.accept(nodeHierarchicalVisitor)) {
break;
}
}
}
return nodeHierarchicalVisitor.visitLeave(this);
The default implementation will:
NullPointerException
if nodeHierarchicalVisitor
is null
.NodeTraversalException
if nodeHierarchicalVisitor
throws a RuntimeException
.Node
s, because it does not have any.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int getLength()
getLength
in interface Annotations.Union
public int getNumValues()
public int hashCode()
hashCode
in class java.lang.Object
public void addValue(Annotations.ElementValue value)
public void removeValue(Annotations.ElementValue value)
public void write(java.io.DataOutput dataOutput)
write
in interface Annotations.Union