Package me.datafox.dfxengine.handles
Class SpaceImpl
java.lang.Object
me.datafox.dfxengine.handles.SpaceImpl
- All Implemented Interfaces:
Comparable<Handled>,Handled,Space
Implementation of
Space.-
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.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface me.datafox.dfxengine.handles.api.Space
getHandleManager
-
Method Details
-
getHandles
- Specified by:
getHandlesin interfaceSpace- Returns:
- unmodifiable
HandleSetcontaining theHandlesof this space, excluding subhandles
-
getAllHandles
Returns an unmodifiableHandleSetcontaining theHandlesof this space, including subhandles. Please note that unlikeSpace.getHandles(), the handle set returned by this method does not reflect handles created after calling this method.- Specified by:
getAllHandlesin interfaceSpace- Returns:
- unmodifiable
HandleSetcontaining theHandlesof this space, including subhandles
-
createHandle
Creates a newHandle. ThrowsUnsupportedOperationExceptionif this is the space containing handles of spaces (HandleManager.getSpaceSpace(), useHandleManager.createSpace(String)instead).- Specified by:
createHandlein interfaceSpace- 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.- Specified by:
getOrCreateHandlein interfaceSpace- 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
- Specified by:
createGroupin interfaceSpace- 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.- Specified by:
getOrCreateGroupin interfaceSpace- 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 (:)
-
toString
-