public interface IMutableDefinitionSet extends IDefinitionSet
IDefinitionSet
to add mutation methods.
It is implemented by SmallDefinitionSet
and LargeDefinitionSet
.
However, a single IDefinition
acts as its own IDefinitionSet
of size 1, but is not a IMutableDefinitionSet
.
Modifier and Type | Method and Description |
---|---|
void |
addDefinition(IDefinition definition)
Adds a definition to this set.
|
void |
removeDefinition(IDefinition definition)
Removes a definition from this set.
|
void |
replaceDefinition(int i,
IDefinition newDef)
Replaces the
IDefinition at the specified index with a new
definition. |
getDefinition, getMaxSize, getSize, isEmpty
void addDefinition(IDefinition definition)
definition
- The IDefinition
to add.void removeDefinition(IDefinition definition)
definition
- The IDefinitionNode
to remove.void replaceDefinition(int i, IDefinition newDef)
IDefinition
at the specified index with a new
definition.i
- The index of the IDefinition
to replace.newDef
- The new IDefinition
to store in the set.Copyright © 2016 The Apache Software Foundation. All rights reserved.