FlyweightProcessingInstruction is a Flyweight pattern
implementation of a singly linked, read-only XML Processing Instruction.
This node could be shared across documents and elements though it does not support the parent relationship.
| Modifier and Type | Field and Description |
|---|---|
| protected String | target
The target of the PI |
| protected String | text
The values for the PI as a String |
| protected Map | values
The values for the PI in name/value pairs |
| Access | Constructor and Description |
|---|---|
| public | |
| public | FlyweightProcessingInstruction(String
is the name of the PI target, Map<String, String> is the values)Map of the values for the PIThis will create a new PI with the given target and values |
| public | FlyweightProcessingInstruction(String
is the name of the PI target, String is the values for the PI as text text)This will create a new PI with the given target and values |
| Modifier and Type | Method and Description |
|---|---|
| protected Node | |
| public String | getTarget()
Implements org. getNamemethod.
|
| public String | getText()
Overrides org. Implements org. |
| public String | getValue(String
is the name of the attribute to lookup. name)Implements org. Returns the value of a specific name in the PI. |
| public Map | |
| public void | setTarget(String
DOCUMENT ME! target)Implements org. setNamemethod.
|
| target | back to summary |
|---|---|
| protected String target The target of the PI | |
| text | back to summary |
|---|---|
| protected String text The values for the PI as a String | |
| values | back to summary |
|---|---|
| protected Map<String, String> values The values for the PI in name/value pairs | |
| FlyweightProcessingInstruction | back to summary |
|---|---|
| public FlyweightProcessingInstruction() A default constructor for implementors to use. | |
| FlyweightProcessingInstruction | back to summary |
|---|---|
| public FlyweightProcessingInstruction(String target, Map<String, String> values) This will create a new PI with the given target and values | |
| FlyweightProcessingInstruction | back to summary |
|---|---|
| public FlyweightProcessingInstruction(String target, String text) This will create a new PI with the given target and values | |
| createXPathResult | back to summary |
|---|---|
| protected Node createXPathResult(Element parent) | |
| getTarget | back to summary |
|---|---|
| public String getTarget() Implements org. Doc from org. This method is the equivalent to the
| |
| getText | back to summary |
|---|---|
| public String getText() Overrides org. Implements org. Doc from org. DOCUMENT ME!
| |
| getValue | back to summary |
|---|---|
| public String getValue(String name) Implements org. Doc from org. Returns the value of a specific name in the PI. | |
| getValues | back to summary |
|---|---|
| public Map Implements org. Doc from org. DOCUMENT ME! | |
| setTarget | back to summary |
|---|---|
| public void setTarget(String target) Implements org. Doc from org. This method is the equivalent to the
| |