Releases: Zhuinden/service-tree
Service Tree 1.6.1
Service Tree 1.6.0
Service Tree 1.6.0 (2017-05-13)
- ADDED:
ServiceTree.Scoped
interface which providesonEnterScope(Node)
andonExitScope()
methods.
onEnterScope
is called when the service is bound to the node.
onExitScope()
is called if the service is removed from the node, or the node is removed from the tree.
- ADDED:
traverseChain
,traverseTree
,traverseSubtree
variants withboolean
that specifies whether the tree root should be included in the traversal.
Service Tree 1.5.2
Service Tree 1.5.2 (2017-05-13)
- ADDED:
hasRootService()
method, which should have existed to pair with@NonNull
getRootService()
. Whoops. - ADDED:
node.createChild(Object)
to allow creating a child for a node without directly chatting with the tree. - ADDED:
node.removeNodeAndChildren()
which removes it from its associated tree. - CHANGE:
node.removeService(String)
is now public, because I shouldn't tell you how to live your life. - READDED:
serviceTree.getTreeRoot()
so that you can dotreeRoot.getBoundServices()
if you so desire.
Service Tree 1.5.1
Service Tree 1.5.1 (2017-05-06)
- ADDED:
findRoot(Node)
method that finds the root for a particular node. - ADDED:
traverseChain(Node, int, Walk)
method wherePRE_ORDER
executes the chain traversal from root to child. - FIX:
getRootService()
is now marked with@NonNull
as it should have been.
Service Tree 1.5.0
Service Tree 1.5.0 (2017-04-27)
- RE-ADDED:
registerRootService()
,unregisterRootService()
,getRootService()
. Sorry for the inconvenience.
Now the root CAN contain information, BUT it is no longer exposed to anyone outside the library. It should have been like this from the start.
-
REMOVED:
getTreeRoot()
. -
CHANGE:
getParent()
will returnnull
for root keys instead ofgetTreeRoot()
. -
ADDED:
node.getChild()
andnode.hasChild()
methods that returns the direct child.
Service Tree 1.4.0
Service Tree 1.4.0 (2017-04-06)
- BREAKING CHANGE: removed
registerRootService()
,unregisterRootService()
,getRootService()
methods.
After thinking a lot about it, the fact that ROOT_KEY and its corresponding "root" exists is an implementation detail, and functions as a guard.
The guard should not be used to store information. If a root is needed for a tree, it should be created with createRootNode()
.
Every other node is a child of that node. It is preferred that the hierarchy is constructed directly by the user.
For safety sake (as the tree root is the parent of all root keys), getTreeRoot()
is still kept. However, traverseChain()
is preferred operation.
- BREAKING CHANGE:
traverseChain()
,traverseTree()
, andtraverseSubtree()
can no longer include the "tree root" bound to the internalROOT_KEY
.
Service Tree 1.3.0
Service Tree 1.3.0 (2017-03-30)
- BREAKING CHANGE:
getService()
is now@NonNull
instead of@Nullable
, and if service is not found in the tree, exception is thrown. - ADDED:
hasService()
method to check if the service exists in the given chain. - BREAKING CHANGE:
ChainWalk
is merged intoWalk
,ChainWalk.CancellationToken
merged intoWalk.CancellationToken
- BREAKING CHANGE:
ServiceTree.traverseChain(Node, ChainWalk)
is nowServiceTree.traverseChain(Node, Walk)
- BREAKING CHANGE:
Walk.execute(Node)
is nowWalk.execute(Node, CancellationToken)
- ENHANCEMENT: Any
Walk
on any subtree or chain is now cancelable usingcancellationToken.cancel()
.
Service Tree 1.2.3
Service Tree 1.2.3 (2017-03-28)
- Add
ServiceTree.traverseChain(Node, ChainWalk)
method. It allows traversing the chain from a particular node through all its parents.
Service Tree 1.2.2
Service Tree 1.2.2 (2017-03-27)
- Add
node.getTree()
method.
Service Tree 1.2.1
Service Tree 1.2.1 (2017-03-25)
- Added
getKeys()
method.