Package eu.bandm.tools.util
Class NamespaceName2String
- All Implemented Interfaces:
Map<NamespaceName,
String>
Maintains a map from to
String
, and reads different file formats.-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorDescriptionConstruct an empty map.Constructs a map with the given data. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsPattern
(String patternMarker) Returns whether the pattern marker is contained anywhere in the values of this map.void
dump
(PrintStream p) Print this map in a symbolic representation to the print stream.entrySet()
boolean
Directly delegate to the implementing map.void
Create a map reading the data from the given source.void
from
(InputStream s, String encoding) Create a map reading the data from the given source.void
Create a map reading the data from the given source.void
Add a key/value pair to the map.int
hashCode()
Directly delegate to the implementing map.put
(NamespaceName k, String v) replacePattern
(String patternMarker, String value) Return a new copy in the data of which all occurences of the patternMarker are replaced by the given value.Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, get, isEmpty, keySet, putAll, remove, size, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
NamespaceName2String
public NamespaceName2String()Construct an empty map. (This constructor is required by collections framework convention.) -
NamespaceName2String
Constructs a map with the given data.
-
-
Method Details
-
equals
Directly delegate to the implementing map.- Specified by:
equals
in interfaceMap<NamespaceName,
String> - Overrides:
equals
in classAbstractMap<NamespaceName,
String>
-
hashCode
public int hashCode()Directly delegate to the implementing map.- Specified by:
hashCode
in interfaceMap<NamespaceName,
String> - Overrides:
hashCode
in classAbstractMap<NamespaceName,
String>
-
from
Create a map reading the data from the given source. For details of the file format seefrom(reader)
.- Throws:
IOException
-
from
Create a map reading the data from the given source. For details of the file format seefrom(reader)
.- Throws:
IOException
-
from
Create a map reading the data from the given source. Each line must start with a namespace name used as a key. The key is limited by a single blank. It must follow the inline syntax, seeNamespaceName.parseInlineURIFormat(java.lang.String)
. The rest of the line, after that separating single blank, is the value stored with the key. With double keys, the later overrides the earlier without notice.- Throws:
IOException
-
from
Add a key/value pair to the map. The key must follow the inline syntax, seeNamespaceName.parseInlineURIFormat(java.lang.String)
. With double keys, the later overrides the earlier without notice.- Throws:
IllegalArgumentException
-
dump
Print this map in a symbolic representation to the print stream. -
entrySet
- Specified by:
entrySet
in interfaceMap<NamespaceName,
String> - Specified by:
entrySet
in classAbstractMap<NamespaceName,
String>
-
put
- Specified by:
put
in interfaceMap<NamespaceName,
String> - Overrides:
put
in classAbstractMap<NamespaceName,
String>
-
containsPattern
Returns whether the pattern marker is contained anywhere in the values of this map. (Prototypical use with xslt style-sheet parameters.) -
replacePattern
Return a new copy in the data of which all occurences of the patternMarker are replaced by the given value. (Prototypical use with xslt style-sheet parameters.)
-