Package org.apache.poi.poifs.property
Class DirectoryProperty
java.lang.Object
org.apache.poi.poifs.property.Property
org.apache.poi.poifs.property.DirectoryProperty
- All Implemented Interfaces:
Iterable<Property>,POIFSViewable,Child,Parent
- Direct Known Subclasses:
RootProperty
Directory property
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new child to the collection of childrenbooleanchangeName(Property property, String newName) Change a Property's namebooleandeleteChild(Property property) Delete a PropertyGet an iterator over the children of this Parent; all elements are instances of Property.booleaniterator()Get an iterator over the children of this Parent, alias forgetChildren()which supports foreach useGet a spliterator over the children of this Parent; all elements are instances of Property.Methods inherited from class org.apache.poi.poifs.property.Property
getName, getNextChild, getPreviousChild, getShortDescription, getSize, getStartBlock, getStorageClsid, getViewableArray, getViewableIterator, isSmall, preferArray, setNextChild, setPreviousChild, setStartBlock, setStorageClsid, shouldUseSmallBlocks, writeDataMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.poi.poifs.property.Child
getNextChild, getPreviousChildMethods inherited from interface org.apache.poi.poifs.property.Parent
setNextChild, setPreviousChild
-
Constructor Details
-
DirectoryProperty
Default constructor- Parameters:
name- the name of the directory
-
-
Method Details
-
changeName
Change a Property's name- Parameters:
property- the Property whose name is being changednewName- the new name for the Property- Returns:
- true if the name change could be made, else false
-
deleteChild
Delete a Property- Parameters:
property- the Property being deleted- Returns:
- true if the Property could be deleted, else false
-
isDirectory
public boolean isDirectory()- Specified by:
isDirectoryin classProperty- Returns:
- true if a directory type Property
-
getChildren
Get an iterator over the children of this Parent; all elements are instances of Property.- Specified by:
getChildrenin interfaceParent- Returns:
- Iterator of children; may refer to an empty collection
-
iterator
Get an iterator over the children of this Parent, alias forgetChildren()which supports foreach use -
spliterator
Get a spliterator over the children of this Parent; all elements are instances of Property.- Specified by:
spliteratorin interfaceIterable<Property>- Returns:
- Spliterator of children; may refer to an empty collection
- Since:
- POI 5.2.0
-
addChild
Add a new child to the collection of children- Specified by:
addChildin interfaceParent- Parameters:
property- the new child to be added; must not be null- Throws:
IOException- if we already have a child with the same name
-