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 java.lang.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.

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.annot8.core.annotations.Group

        io.annot8.core.annotations.Group.Builder
    • Constructor Summary

      Constructors 
      Constructor Description
      TestGroup​()  
      TestGroup​(java.lang.String id, java.lang.String type)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsAnnotation​(io.annot8.core.annotations.Annotation annotation)  
      boolean equals​(java.lang.Object o)  
      java.lang.String getId​()  
      io.annot8.core.properties.ImmutableProperties getProperties​()  
      java.util.Map<java.lang.String,java.util.stream.Stream<io.annot8.core.references.AnnotationReference>> getReferences​()  
      java.util.Optional<java.lang.String> getRole​(io.annot8.core.annotations.Annotation annotation)  
      java.lang.String getType​()  
      int hashCode​()  
      void setAnnotations​(java.util.Map<io.annot8.core.references.AnnotationReference,java.lang.String> annotations)  
      void setId​(java.lang.String id)  
      void setProperties​(io.annot8.core.properties.ImmutableProperties properties)  
      void setType​(java.lang.String type)  
      • Methods inherited from interface io.annot8.core.annotations.Group

        containsRole, getAnnotations, getAnnotations, getAnnotationsForContent, getAnnotationsForContentAndRole, getRoles, sameGroup
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestGroup

        public TestGroup​()
      • TestGroup

        public TestGroup​(java.lang.String id,
                         java.lang.String type)
    • Method Detail

      • getReferences

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

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

        public java.util.Optional<java.lang.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 java.lang.String getId​()
        Specified by:
        getId in interface io.annot8.core.helpers.WithId
      • setId

        public void setId​(java.lang.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 java.lang.String getType​()
        Specified by:
        getType in interface io.annot8.core.helpers.WithType
      • setType

        public void setType​(java.lang.String type)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class java.lang.Object