Class NodeRepository<T>

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected KeepType keepType  
      protected java.util.ArrayList<T> nodeList  
      protected java.util.Map<java.lang.String,​T> nodeMap  
    • Field Detail

      • nodeList

        protected final java.util.ArrayList<T> nodeList
      • nodeMap

        protected final java.util.Map<java.lang.String,​T> nodeMap
      • keepType

        protected final KeepType keepType
    • Constructor Detail

      • NodeRepository

        public NodeRepository​(@Nullable
                              KeepType keepType)
    • Method Detail

      • getKeepDataKey

        @NotNull
        public abstract DataKey<KeepType> getKeepDataKey()
      • getReferencedElements

        @NotNull
        public abstract java.util.Set<T> getReferencedElements​(Node parent)
      • visitNodes

        @SafeVarargs
        protected final void visitNodes​(@NotNull
                                        Node parent,
                                        @NotNull
                                        java.util.function.Consumer<Node> runnable,
                                        @NotNull
                                        java.lang.Class<? extends Node>... classes)
      • normalizeKey

        @NotNull
        public java.lang.String normalizeKey​(@NotNull
                                             java.lang.CharSequence key)
      • getFromRaw

        @Nullable
        public T getFromRaw​(@NotNull
                            java.lang.CharSequence rawKey)
      • putRawKey

        @Nullable
        public T putRawKey​(@NotNull
                           java.lang.CharSequence key,
                           @NotNull
                           T t)
      • getValues

        @NotNull
        public java.util.Collection<T> getValues()
      • transferReferences

        public static <T> boolean transferReferences​(@NotNull
                                                     NodeRepository<T> destination,
                                                     @NotNull
                                                     NodeRepository<T> included,
                                                     boolean onlyIfUndefined,
                                                     @Nullable
                                                     java.util.Map<java.lang.String,​java.lang.String> referenceIdMap)
      • put

        @Nullable
        public T put​(@NotNull
                     java.lang.String s,
                     @NotNull
                     T t)
        Specified by:
        put in interface java.util.Map<java.lang.String,​T>
      • putAll

        public void putAll​(@NotNull
                           java.util.Map<? extends java.lang.String,​? extends T> map)
        Specified by:
        putAll in interface java.util.Map<java.lang.String,​T>
      • remove

        @Nullable
        public T remove​(@NotNull
                        java.lang.Object o)
        Specified by:
        remove in interface java.util.Map<java.lang.String,​T>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<java.lang.String,​T>
      • size

        public int size()
        Specified by:
        size in interface java.util.Map<java.lang.String,​T>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Map<java.lang.String,​T>
      • containsKey

        public boolean containsKey​(@NotNull
                                   java.lang.Object o)
        Specified by:
        containsKey in interface java.util.Map<java.lang.String,​T>
      • containsValue

        public boolean containsValue​(java.lang.Object o)
        Specified by:
        containsValue in interface java.util.Map<java.lang.String,​T>
      • get

        @Nullable
        public T get​(@NotNull
                     java.lang.Object o)
        Specified by:
        get in interface java.util.Map<java.lang.String,​T>
      • keySet

        @NotNull
        public java.util.Set<java.lang.String> keySet()
        Specified by:
        keySet in interface java.util.Map<java.lang.String,​T>
      • values

        @NotNull
        public java.util.List<T> values()
        Specified by:
        values in interface java.util.Map<java.lang.String,​T>
      • entrySet

        @NotNull
        public java.util.Set<java.util.Map.Entry<java.lang.String,​T>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<java.lang.String,​T>
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map<java.lang.String,​T>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<java.lang.String,​T>
        Overrides:
        hashCode in class java.lang.Object