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  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      boolean containsKey​(@NotNull java.lang.Object o)  
      boolean containsValue​(java.lang.Object o)  
      @NotNull java.util.Set<java.util.Map.Entry<java.lang.String,​T>> entrySet()  
      boolean equals​(java.lang.Object o)  
      T get​(@NotNull java.lang.Object o)  
      abstract @NotNull DataKey<? extends NodeRepository<T>> getDataKey()  
      T getFromRaw​(@NotNull java.lang.CharSequence rawKey)  
      abstract @NotNull DataKey<KeepType> getKeepDataKey()  
      abstract @NotNull java.util.Set<T> getReferencedElements​(Node parent)  
      @NotNull java.util.Collection<T> getValues()  
      int hashCode()  
      boolean isEmpty()  
      @NotNull java.util.Set<java.lang.String> keySet()  
      @NotNull java.lang.String normalizeKey​(@NotNull java.lang.CharSequence key)  
      T put​(@NotNull java.lang.String s, T t)  
      void putAll​(@NotNull java.util.Map<? extends java.lang.String,​? extends T> map)  
      T putRawKey​(@NotNull java.lang.CharSequence key, T t)  
      T remove​(@NotNull java.lang.Object o)  
      int size()  
      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)  
      @NotNull java.util.List<T> values()  
      protected void visitNodes​(@NotNull Node parent, @NotNull java.util.function.Consumer<Node> runnable, @NotNull java.lang.Class<? extends Node>... classes)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • 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
                              @Nullable KeepType keepType)
    • Method Detail

      • getKeepDataKey

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

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

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

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

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

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

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

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

        @Nullable
        public T put​(@NotNull
                     @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
                           @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
                        @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
                                   @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
                     @NotNull java.lang.Object o)
        Specified by:
        get in interface java.util.Map<java.lang.String,​T>
      • keySet

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

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

        @NotNull
        public @NotNull 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