Class TestGroup

  • All Implemented Interfaces:
    io.annot8.core.annotations.Group, io.annot8.core.helpers.WithId, io.annot8.core.helpers.WithProperties, io.annot8.core.helpers.WithType

    public class TestGroup
    extends Object
    implements io.annot8.core.annotations.Group
    A group implementation which provides convenience for unit testing.

    DO NOT USE THIS OUTSIDE A UNIT TEST.

    It does not have the necessary correctness of implementation, as it stores annotation so changes to the annotation will not be reflected.

    • Constructor Detail

      • TestGroup

        public TestGroup()
    • Method Detail

      • getReferences

        public Map<String,Stream<io.annot8.core.references.AnnotationReference>> getReferences()
        Specified by:
        getReferences in interface io.annot8.core.annotations.Group
      • setAnnotations

        public void setAnnotations​(Map<io.annot8.core.references.AnnotationReference,String> annotations)
      • getRole

        public Optional<String> getRole​(io.annot8.core.annotations.Annotation annotation)
        Specified by:
        getRole in interface io.annot8.core.annotations.Group
      • containsAnnotation

        public boolean containsAnnotation​(io.annot8.core.annotations.Annotation annotation)
        Specified by:
        containsAnnotation in interface io.annot8.core.annotations.Group
      • getId

        public String getId()
        Specified by:
        getId in interface io.annot8.core.helpers.WithId
      • setId

        public void setId​(String id)
      • getProperties

        public io.annot8.core.properties.ImmutableProperties getProperties()
        Specified by:
        getProperties in interface io.annot8.core.helpers.WithProperties
      • setProperties

        public void setProperties​(io.annot8.core.properties.ImmutableProperties properties)
      • getType

        public String getType()
        Specified by:
        getType in interface io.annot8.core.helpers.WithType
      • setType

        public void setType​(String type)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object