PlanNode implements Iterable<PlanNode>, Readable, Cloneable, java.io.Serializable { public List<PlanNode> getChildren() { return childrenView; } PlanNode( Type type );  PlanNode( Type type,
                     PlanNode parent );  PlanNode( Type type,
                     SelectorName... selectors );  PlanNode( Type type,
                     Iterable<SelectorName> selectors );  PlanNode( Type type,
                     PlanNode parent,
                     SelectorName... selectors );  PlanNode( Type type,
                     PlanNode parent,
                     Iterable<SelectorName> selectors ); Type getType(); void setType( Type type ); boolean isNot( Type type ); boolean isNotOneOf( Type first,
                               Type... rest ); boolean isNotOneOf( Set<Type> types ); boolean is( Type type ); boolean isOneOf( Type first,
                            Type... rest ); boolean isOneOf( Set<Type> types ); boolean isBelow( PlanNode possibleAncestor ); boolean isAbove( PlanNode possibleDescendant ); PlanNode getParent(); void setParent( PlanNode parent ); void insertAsParent( PlanNode newParent ); PlanNode removeFromParent(); List<PlanNode> getChildren(); @Override Iterator<PlanNode> iterator(); List<PlanNode> removeAllChildren(); boolean replaceChild( PlanNode child,
                                 PlanNode replacement ); int getChildCount(); PlanNode getFirstChild(); PlanNode getLastChild(); PlanNode getChild( int index ); void addFirstChild( PlanNode child ); void addLastChild( PlanNode child ); void addChildren( Iterable<PlanNode> otherChildren ); void addChildren( PlanNode first,
                             PlanNode second ); void addChildren( PlanNode first,
                             PlanNode second,
                             PlanNode third ); boolean removeChild( PlanNode child ); void extractChild( PlanNode child ); void extractFromParent(); Set<Property> getPropertyKeys(); Object getProperty( Property propertyId ); ValueType getProperty( Property propertyId,
                                              Class<ValueType> type ); @SuppressWarnings( "unchecked" ) Collection<ValueType> getPropertyAsCollection( Property propertyId,
                                                                      Class<ValueType> type ); @SuppressWarnings( "unchecked" ) List<ValueType> getPropertyAsList( Property propertyId,
                                                          Class<ValueType> type ); Object setProperty( Property propertyId,
                               Object value ); Object removeProperty( Object propertyId ); boolean hasProperty( Property propertyId ); boolean hasCollectionProperty( Property propertyId ); boolean hasBooleanProperty( Property propertyId ); void addSelector( SelectorName symbol ); void addSelector( SelectorName first,
                             SelectorName second ); void addSelectors( Iterable<SelectorName> names ); boolean replaceSelector( SelectorName original,
                                    SelectorName replacement ); Set<SelectorName> getSelectors(); LinkedList<PlanNode> getPathTo( PlanNode descendant ); boolean hasAncestorOfType( Type type ); boolean hasAncestorOfType( Type firstType,
                                      Type... additionalTypes ); boolean hasAncestorOfType( Set<Type> types ); @Override String toString(); @Override int hashCode(); @Override final boolean equals( Object obj ); @Override PlanNode clone(); boolean isSameAs( PlanNode other ); @Override String getString(); PlanNode findAncestor( Type typeToFind ); PlanNode findAncestor( Type firstTypeToFind,
                                  Type... additionalTypesToFind ); PlanNode findAncestor( Set<Type> typesToFind ); List<PlanNode> findAllFirstNodesAtOrBelow( Type typeToFind ); void apply( Traversal order,
                       final Operation operation,
                       final Type type ); void apply( Traversal order,
                       Operation operation,
                       Type firstType,
                       Type... additionalTypes ); void apply( Traversal order,
                       final Operation operation,
                       final Set<Type> types ); void apply( Traversal order,
                       Operation operation ); void applyToAncestorsUpTo( Type stopType,
                                      Operation operation ); void applyToAncestors( Operation operation ); List<PlanNode> findAllAtOrBelow(); List<PlanNode> findAllAtOrBelow( Traversal order ); List<PlanNode> findAllAtOrBelow( Type typeToFind ); List<PlanNode> findAllAtOrBelow( Type firstTypeToFind,
                                            Type... additionalTypesToFind ); List<PlanNode> findAllAtOrBelow( Set<Type> typesToFind ); List<PlanNode> findAllAtOrBelow( Traversal order,
                                            Type typeToFind ); List<PlanNode> findAllAtOrBelow( Traversal order,
                                            Type firstTypeToFind,
                                            Type... additionalTypesToFind ); List<PlanNode> findAllAtOrBelow( Traversal order,
                                            Set<Type> typesToFind ); PlanNode findAtOrBelow( Type typeToFind ); PlanNode findAtOrBelow( Type firstTypeToFind,
                                   Type... additionalTypesToFind ); PlanNode findAtOrBelow( Set<Type> typesToFind ); PlanNode findAtOrBelow( Traversal order,
                                   Type typeToFind ); PlanNode findAtOrBelow( Traversal order,
                                   Type firstTypeToFind,
                                   Type... additionalTypesToFind ); PlanNode findAtOrBelow( Traversal order,
                                   Set<Type> typesToFind ); void orderChildren( Comparator<PlanNode> comparator ); void orderChildren( final Type type,
                               final Comparator<PlanNode> comparator );  }
@Test( expected = UnsupportedOperationException.class ) public void shouldReturnImmutableListOfChildren() { parent = new PlanNode(Type.JOIN); new PlanNode(Type.ACCESS, parent); new PlanNode(Type.DUP_REMOVE, parent); new PlanNode(Type.GROUP, parent); parent.getChildren().clear(); }