Package com.vladsch.flexmark.util.ast
Class NodeRepository<T>
- java.lang.Object
-
- com.vladsch.flexmark.util.ast.NodeRepository<T>
-
- All Implemented Interfaces:
java.util.Map<java.lang.String,T>
- Direct Known Subclasses:
AbbreviationRepository
,EnumeratedReferenceRepository
,FootnoteRepository
,MacroDefinitionRepository
,ReferenceRepository
,ZzzzzzRepository
public abstract class NodeRepository<T> extends java.lang.Object implements java.util.Map<java.lang.String,T>
-
-
Constructor Summary
Constructors Constructor Description NodeRepository(KeepType keepType)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object o)
boolean
containsValue(java.lang.Object o)
java.util.Set<java.util.Map.Entry<java.lang.String,T>>
entrySet()
boolean
equals(java.lang.Object o)
T
get(java.lang.Object o)
abstract DataKey<? extends NodeRepository<T>>
getDataKey()
T
getFromRaw(java.lang.CharSequence rawKey)
abstract DataKey<KeepType>
getKeepDataKey()
abstract java.util.Set<T>
getReferencedElements(Node parent)
java.util.Collection<T>
getValues()
int
hashCode()
boolean
isEmpty()
java.util.Set<java.lang.String>
keySet()
java.lang.String
normalizeKey(java.lang.CharSequence key)
T
put(java.lang.String s, T t)
void
putAll(java.util.Map<? extends java.lang.String,? extends T> map)
T
putRawKey(java.lang.CharSequence key, T t)
T
remove(java.lang.Object o)
int
size()
static <T> boolean
transferReferences(NodeRepository<T> destination, NodeRepository<T> included, boolean onlyIfUndefined, java.util.Map<java.lang.String,java.lang.String> referenceIdMap)
java.util.List<T>
values()
protected void
visitNodes(Node parent, java.util.function.Consumer<Node> runnable, java.lang.Class<? extends Node>... classes)
-
-
-
Constructor Detail
-
NodeRepository
public NodeRepository(@Nullable KeepType keepType)
-
-
Method Detail
-
getDataKey
@NotNull public abstract DataKey<? extends NodeRepository<T>> getDataKey()
-
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)
-
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 interfacejava.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 interfacejava.util.Map<java.lang.String,T>
-
remove
@Nullable public T remove(@NotNull java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Map<java.lang.String,T>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Map<java.lang.String,T>
-
size
public int size()
- Specified by:
size
in interfacejava.util.Map<java.lang.String,T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Map<java.lang.String,T>
-
containsKey
public boolean containsKey(@NotNull java.lang.Object o)
- Specified by:
containsKey
in interfacejava.util.Map<java.lang.String,T>
-
containsValue
public boolean containsValue(java.lang.Object o)
- Specified by:
containsValue
in interfacejava.util.Map<java.lang.String,T>
-
get
@Nullable public T get(@NotNull java.lang.Object o)
- Specified by:
get
in interfacejava.util.Map<java.lang.String,T>
-
keySet
@NotNull public java.util.Set<java.lang.String> keySet()
- Specified by:
keySet
in interfacejava.util.Map<java.lang.String,T>
-
values
@NotNull public java.util.List<T> values()
- Specified by:
values
in interfacejava.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 interfacejava.util.Map<java.lang.String,T>
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfacejava.util.Map<java.lang.String,T>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Map<java.lang.String,T>
- Overrides:
hashCode
in classjava.lang.Object
-
-