public class ChainedData extends DelegatedData
Note: If you have elements foo.1, foo.2, foo.3 in first Data object and foo.4, foo.5, foo.6 in second Data object, then fetching children of foo will return only foo.1 foo.2 foo.3 from first Data object.
DelegatedData.DelegatedIterator
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG_MULTIPLE_ASSIGNMENTS |
static Logger |
logger |
Constructor and Description |
---|
ChainedData(Data... dataList) |
ChainedData(Data data)
Optmization for case of single item.
|
ChainedData(List<Data> dataList) |
Modifier and Type | Method and Description |
---|---|
Data |
createChild(String path)
Retrieves the HDF object that is the root of the subtree at hdfpath, create the subtree if it
doesn't exist
|
boolean |
getBooleanValue(String path)
Retrieves the value at the specified path in this HDF node's subtree.
|
Data |
getChild(String path)
Retrieves the object that is the root of the subtree at hdfpath, returning null if the subtree
doesn't exist
|
int |
getIntValue(String path)
Retrieves the value at the specified path in this HDF node's subtree.
|
int |
getIntValue(String path,
int defaultValue)
Retrieves the integer value at the specified path in this HDF node's subtree.
|
String |
getValue(String path)
Retrieves the value at the specified path in this HDF node's subtree.
|
String |
getValue(String path,
String defaultValue)
Retrieves the value at the specified path in this HDF node's subtree.
|
protected DelegatedData |
newInstance(Data newDelegate)
Subclasses will want to override this method to return a Data object of their specific type.
|
void |
optimize()
Optimizes the Data structure for performance.
|
void |
toString(StringBuilder out,
int indent) |
void |
write(Appendable out,
int indent)
Write out the String representation of this HDF node.
|
copy, copy, getAttribute, getAttributeCount, getAttributes, getBooleanValue, getChildCount, getChildren, getDelegate, getEscapeMode, getFullPath, getIntValue, getName, getNextSibling, getParent, getRoot, getSymlink, getValue, hasAttribute, isFirstSibling, isLastSibling, newChildIterator, removeTree, setAttribute, setEscapeMode, setSymlink, setSymlink, setSymlink, setValue, setValue, toString, unwrap
public static final Logger logger
public static final boolean DEBUG_MULTIPLE_ASSIGNMENTS
public ChainedData(Data data)
data
- a single data object to wrap.public ChainedData(Data... dataList)
protected DelegatedData newInstance(Data newDelegate)
DelegatedData
newInstance
in class DelegatedData
newDelegate
- the Data object to wrap with a new delegatorpublic Data getChild(String path)
Data
getChild
in interface Data
getChild
in class DelegatedData
public Data createChild(String path)
Data
createChild
in interface Data
createChild
in class DelegatedData
public String getValue(String path, String defaultValue)
Data
getValue
in interface Data
getValue
in class DelegatedData
public int getIntValue(String path, int defaultValue)
Data
getIntValue
in interface Data
getIntValue
in class DelegatedData
public String getValue(String path)
Data
getValue
in interface Data
getValue
in class DelegatedData
public int getIntValue(String path)
Data
getIntValue
in interface Data
getIntValue
in class DelegatedData
public boolean getBooleanValue(String path)
Data
getBooleanValue
in interface Data
getBooleanValue
in class DelegatedData
public void toString(StringBuilder out, int indent)
toString
in interface Data
toString
in class DelegatedData
public void write(Appendable out, int indent) throws IOException
Data
write
in interface Data
write
in class DelegatedData
IOException
public void optimize()
Data
optimize
in interface Data
optimize
in class DelegatedData
Copyright © 2010–2014 Google. All rights reserved.