Package me.datafox.dfxengine.handles.api
Interface Space
- All Superinterfaces:
Comparable<Handled>,Handled
- All Known Implementing Classes:
SpaceImpl
-
Method Summary
Modifier and TypeMethodDescriptioncreateGroup(String id) createHandle(String id) Creates a newHandle.Creates aGroupwith the specified id if it does not already exist and returns the group with that id.Creates aHandlewith the specified id if it does not already exist and returns the handle with that id.
-
Method Details
-
getHandleManager
HandleManager getHandleManager()- Returns:
HandleManagermanaging this space
-
getHandles
HandleSet getHandles() -
getAllHandles
HandleSet getAllHandles()Returns an unmodifiableHandleSetcontaining theHandlesof this space, including subhandles. Please note that unlikegetHandles(), the handle set returned by this method does not reflect handles created after calling this method. -
createHandle
Creates a newHandle. ThrowsUnsupportedOperationExceptionif this is the space containing handles of spaces (HandleManager.getSpaceSpace(), useHandleManager.createSpace(String)instead).- Parameters:
id-Stringid for the newHandle- Returns:
- created
Handle - Throws:
NullPointerException- if the id isnullIllegalArgumentException- if the id is empty, blank, contains non-ASCII or non-printable characters or more than one colon (:), or if aHandlewith the given id already exists in this spaceUnsupportedOperationException- if this is the space containingHandlesof spaces
-
getOrCreateHandle
Creates aHandlewith the specified id if it does not already exist and returns the handle with that id. ThrowsUnsupportedOperationExceptionif this is the space containing handles of spaces (HandleManager.getSpaceSpace()) and a handle with the specified id is not present. UseHandleManager.getOrCreateSpace(String)instead.- Parameters:
id-Stringid for theHandle- Returns:
- created or pre-existing
Handle - Throws:
NullPointerException- if the id isnullIllegalArgumentException- if the id is empty, blank, contains non-ASCII or non-printable characters or more than one colon (:)UnsupportedOperationException- if this is the space containingHandlesof spaces and a handle with the specified id is not present
-
getGroups
-
createGroup
- Parameters:
id-Stringid for the newGroup- Returns:
- created
Group - Throws:
NullPointerException- if the id isnullIllegalArgumentException- if the id is empty, blank, contains non-ASCII or non-printable characters or the colon (:), or if aGroupwith the given id already exists in this space
-
getOrCreateGroup
Creates aGroupwith the specified id if it does not already exist and returns the group with that id.- Parameters:
id-Stringid for theGroup- Returns:
- created or pre-existing
Group - Throws:
NullPointerException- if the id isnullIllegalArgumentException- if the id is empty, blank, contains non-ASCII or non-printable characters or the colon (:)
-