Class AbstractClassifierInstance<T extends Classifier<T>>

java.lang.Object
io.lionweb.lioncore.java.model.impl.AbstractClassifierInstance<T>
All Implemented Interfaces:
ClassifierInstance<T>, HasFeatureValues
Direct Known Subclasses:
DynamicClassifierInstance, M3Node, ProxyNode

public abstract class AbstractClassifierInstance<T extends Classifier<T>> extends Object implements ClassifierInstance<T>
  • Field Details

  • Constructor Details

    • AbstractClassifierInstance

      public AbstractClassifierInstance()
  • Method Details

    • getAnnotations

      @Nonnull public List<AnnotationInstance> getAnnotations()
      Description copied from interface: ClassifierInstance
      Return all the annotations associated to this ClassifierInstance.
      Specified by:
      getAnnotations in interface ClassifierInstance<T extends Classifier<T>>
    • getAnnotations

      @Nonnull public List<AnnotationInstance> getAnnotations(@Nonnull Annotation annotation)
      Given a specific Annotation type it returns either the list of instances of that Annotation associated to the Node.
      Specified by:
      getAnnotations in interface ClassifierInstance<T extends Classifier<T>>
    • addAnnotation

      public void addAnnotation(@Nonnull AnnotationInstance instance)
      Description copied from interface: ClassifierInstance
      Add the annotation. Note that we can always have multiple annotation instances of the same annotation type attached to a node, so this will never replace an existing annotation instance.
      Specified by:
      addAnnotation in interface ClassifierInstance<T extends Classifier<T>>
    • removeAnnotation

      public void removeAnnotation(@Nonnull AnnotationInstance instance)
      Specified by:
      removeAnnotation in interface ClassifierInstance<T extends Classifier<T>>
    • removeChild

      public void removeChild(Node child)
      Description copied from interface: HasFeatureValues
      Remove the given child from the list of children associated with the Node, making it a dangling Node. If the specified Node is not currently a child of this Node the exception IllegalArgumentException will be thrown.
      Specified by:
      removeChild in interface HasFeatureValues
    • removeChild

      public void removeChild(@Nonnull Containment containment, int index)
      Description copied from interface: HasFeatureValues
      Remove the child at the given index, considering the children under the given containment.

      If there is no match the exception IllegalArgumentException will be thrown.

      Specified by:
      removeChild in interface HasFeatureValues
    • removeReferenceValue

      public void removeReferenceValue(@Nonnull Reference reference, int index)
      Description copied from interface: HasFeatureValues
      Remove the reference value at the given index, considering the reference values under the given reference.

      If there is no match the exception IllegalArgumentException will be thrown.

      Specified by:
      removeReferenceValue in interface HasFeatureValues
    • removeReferenceValue

      public void removeReferenceValue(@Nonnull Reference reference, @Nullable ReferenceValue referenceValue)
      Description copied from interface: HasFeatureValues
      Remove the first reference value that is equal to the given referenceValue. Node. If there is no match the exception IllegalArgumentException will be thrown.
      Specified by:
      removeReferenceValue in interface HasFeatureValues