public class DirectoryProperty extends Property implements Parent, java.lang.Iterable<Property>
Modifier and Type | Class and Description |
---|---|
static class |
DirectoryProperty.PropertyComparator |
_NO_INDEX, _NODE_BLACK, _NODE_RED
Modifier | Constructor and Description |
---|---|
protected |
DirectoryProperty(int index,
byte[] array,
int offset)
reader constructor
|
|
DirectoryProperty(java.lang.String name)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(Property property)
Add a new child to the collection of children
|
boolean |
changeName(Property property,
java.lang.String newName)
Change a Property's name
|
boolean |
deleteChild(Property property)
Delete a Property
|
java.util.Iterator<Property> |
getChildren()
Get an iterator over the children of this Parent; all elements
are instances of Property.
|
boolean |
isDirectory() |
java.util.Iterator<Property> |
iterator()
Get an iterator over the children of this Parent, alias for
getChildren() which supports foreach use |
protected void |
preWrite()
Perform whatever activities need to be performed prior to
writing
|
getChildIndex, getIndex, getName, getNextChild, getPreviousChild, getShortDescription, getSize, getStartBlock, getStorageClsid, getViewableArray, getViewableIterator, isSmall, preferArray, setChildProperty, setIndex, setName, setNextChild, setNodeColor, setPreviousChild, setPropertyType, setSize, setStartBlock, setStorageClsid, shouldUseSmallBlocks, writeData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setNextChild, setPreviousChild
getNextChild, getPreviousChild
public DirectoryProperty(java.lang.String name)
name
- the name of the directoryprotected DirectoryProperty(int index, byte[] array, int offset)
index
- index numberarray
- byte dataoffset
- offset into byte datapublic boolean changeName(Property property, java.lang.String newName)
property
- the Property whose name is being changednewName
- the new name for the Propertypublic boolean deleteChild(Property property)
property
- the Property being deletedpublic boolean isDirectory()
isDirectory
in class Property
protected void preWrite()
public java.util.Iterator<Property> getChildren()
getChildren
in interface Parent
public java.util.Iterator<Property> iterator()
getChildren()
which supports foreach useiterator
in interface java.lang.Iterable<Property>
public void addChild(Property property) throws java.io.IOException
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.