@Test public void testCreateExcludedRoot_fails() { thrown.expect(IllegalStateException.class); rootNode.asExcludedUnit(); }
public ProductPartitionNode asExcludedUnit() { if (getParent() == null) { throw new IllegalStateException("The root node cannot be an excluded unit"); } nodeState = nodeState.transitionTo(NodeType.EXCLUDED_UNIT); removeAllChildren(); return this; }
ProductPartitionNode { public ProductPartitionNode asExcludedUnit() { if (getParent() == null) { throw new IllegalStateException("The root node cannot be an excluded unit"); } nodeState = nodeState.transitionTo(NodeType.EXCLUDED_UNIT); removeAllChildren(); return this; } }
ProductPartitionNode { public ProductPartitionNode asExcludedUnit() { if (getParent() == null) { throw new IllegalStateException("The root node cannot be an excluded unit"); } nodeState = nodeState.transitionTo(NodeType.EXCLUDED_UNIT); removeAllChildren(); return this; } ProductPartitionNode(@Nullable ProductPartitionNode parentNode,
      @Nullable ProductDimension dimension, @Nullable Long partitionId,
      Comparator<? super ProductDimension> comparator); }
ProductPartitionNode { public ProductPartitionNode asExcludedUnit() { if (getParent() == null) { throw new IllegalStateException("The root node cannot be an excluded unit"); } nodeState = nodeState.transitionTo(NodeType.EXCLUDED_UNIT); removeAllChildren(); return this; } ProductPartitionNode(@Nullable ProductPartitionNode parentNode,
      @Nullable ProductDimension dimension, @Nullable Long partitionId,
      Comparator<? super ProductDimension> comparator); ProductDimension getDimension(); @Nullable Long getProductPartitionId(); boolean isSubdivision(); boolean isUnit(); ProductPartitionNode asSubdivision(); Iterable<ProductPartitionNode> getChildren(); ProductPartitionNode getChild(ProductDimension dimension); boolean hasChild(ProductDimension dimension); @Nullable Long getBid(); boolean isBiddableUnit(); boolean isExcludedUnit(); @Override String toString(); String toDetailedString(); static String toString(ProductDimension dimension); ProductPartitionNode getParent(); ProductPartitionNode addChild(ProductDimension childDimension); ProductPartitionNode removeChild(ProductDimension childDimension); ProductPartitionNode removeAllChildren(); ProductPartitionNode asExcludedUnit(); ProductPartitionNode asBiddableUnit(); ProductPartitionNode setBid(@Nullable Long bidInMicros); @Nullable String getTrackingUrlTemplate(); ProductPartitionNode setTrackingUrlTemplate(String trackingUrlTemplate); ProductPartitionNode putCustomParameter(String key, String value); @Nullable String getCustomParameter(String key); ImmutableMap<String, String> getCustomParameters(); ProductPartitionNode removeCustomParameter(String key); }
ProductPartitionNode { public ProductPartitionNode asExcludedUnit() { if (getParent() == null) { throw new IllegalStateException("The root node cannot be an excluded unit"); } nodeState = nodeState.transitionTo(NodeType.EXCLUDED_UNIT); removeAllChildren(); return this; } ProductPartitionNode(@Nullable ProductPartitionNode parentNode,
      @Nullable ProductDimension dimension, @Nullable Long partitionId,
      Comparator<? super ProductDimension> comparator); ProductDimension getDimension(); @Nullable Long getProductPartitionId(); boolean isSubdivision(); boolean isUnit(); ProductPartitionNode asSubdivision(); Iterable<ProductPartitionNode> getChildren(); ProductPartitionNode getChild(ProductDimension dimension); boolean hasChild(ProductDimension dimension); @Nullable Long getBid(); boolean isBiddableUnit(); boolean isExcludedUnit(); @Override String toString(); String toDetailedString(); static String toString(ProductDimension dimension); ProductPartitionNode getParent(); ProductPartitionNode addChild(ProductDimension childDimension); ProductPartitionNode removeChild(ProductDimension childDimension); ProductPartitionNode removeAllChildren(); ProductPartitionNode asExcludedUnit(); ProductPartitionNode asBiddableUnit(); ProductPartitionNode setBid(@Nullable Long bidInMicros); @Nullable String getTrackingUrlTemplate(); ProductPartitionNode setTrackingUrlTemplate(String trackingUrlTemplate); ProductPartitionNode putCustomParameter(String key, String value); @Nullable String getCustomParameter(String key); ImmutableMap<String, String> getCustomParameters(); ProductPartitionNode removeCustomParameter(String key);  }