public class UnmodifiableData extends DelegatedData
Modifier and Type | Class and Description |
---|---|
protected class |
UnmodifiableData.UnmodifiableIterator |
DelegatedData.DelegatedIterator
Constructor and Description |
---|
UnmodifiableData(Data delegate) |
Modifier and Type | Method and Description |
---|---|
void |
copy(Data from)
Does a deep copy the attributes and values from one node to another
|
void |
copy(String toPath,
Data from)
Does a deep copy of the attributes and values from one node to another.
|
Data |
createChild(String path)
createChild(java.lang.String) calls DelegatedData.getChild(java.lang.String) and throws UnsupportedOperationException
if no object was found. |
protected Iterator<DelegatedData> |
newChildIterator()
Override in order to not allow modifying children with remove().
|
protected DelegatedData |
newInstance(Data newDelegate)
Subclasses will want to override this method to return a Data object of their specific type.
|
void |
removeTree(String path)
Remove the specified subtree.
|
void |
setAttribute(String key,
String value)
Sets an attribute key and value on the current node, replacing any existing value.
|
void |
setEscapeMode(EscapeMode mode)
Set the escaping that was applied to this HDF node.
|
void |
setSymlink(Data symLink)
Set this node to be a symbolic link to another node.
|
void |
setSymlink(String sourcePath,
Data destination)
Set the source node to be a symbolic link to the destination.
|
void |
setSymlink(String sourcePath,
String destinationPath)
Set the source node to be a symbolic link to the destination.
|
void |
setValue(String value)
Set the value of this node.
|
void |
setValue(String path,
String value)
Sets the value at the specified path in this HDF node's subtree.
|
getAttribute, getAttributeCount, getAttributes, getBooleanValue, getBooleanValue, getChild, getChildCount, getChildren, getDelegate, getEscapeMode, getFullPath, getIntValue, getIntValue, getIntValue, getName, getNextSibling, getParent, getRoot, getSymlink, getValue, getValue, getValue, hasAttribute, isFirstSibling, isLastSibling, optimize, toString, toString, unwrap, write
public UnmodifiableData(Data delegate)
protected DelegatedData newInstance(Data newDelegate)
DelegatedData
newInstance
in class DelegatedData
newDelegate
- the Data object to wrap with a new delegatorpublic void copy(Data from)
Data
copy
in interface Data
copy
in class DelegatedData
from
- Data object whose value should be copied over.public void copy(String toPath, Data from)
Data
copy
in interface Data
copy
in class DelegatedData
toPath
- destination path for the deep copy.from
- Data object that should be copied over.public Data createChild(String path)
createChild(java.lang.String)
calls DelegatedData.getChild(java.lang.String)
and throws UnsupportedOperationException
if no object was found.createChild
in interface Data
createChild
in class DelegatedData
protected Iterator<DelegatedData> newChildIterator()
newChildIterator
in class DelegatedData
public void setSymlink(String sourcePath, Data destination)
Data
setSymlink
in interface Data
setSymlink
in class DelegatedData
public void setSymlink(String sourcePath, String destinationPath)
Data
setSymlink
in interface Data
setSymlink
in class DelegatedData
public void setSymlink(Data symLink)
Data
setSymlink
in interface Data
setSymlink
in class DelegatedData
public void setAttribute(String key, String value)
Data
setAttribute
in interface Data
setAttribute
in class DelegatedData
key
- the name of the attribute to add/modify.value
- the value to assign it. Value of null
will clear the attribute.public void removeTree(String path)
Data
removeTree
in interface Data
removeTree
in class DelegatedData
public void setValue(String path, String value)
Data
setValue
in interface Data
setValue
in class DelegatedData
public void setValue(String value)
Data
setValue
in interface Data
setValue
in class DelegatedData
public void setEscapeMode(EscapeMode mode)
Data
setEscapeMode
in interface Data
setEscapeMode
in class DelegatedData
Data.getEscapeMode()
Copyright © 2010–2015 Google. All rights reserved.