Commit graph

246 commits

Author SHA1 Message Date
7a10498a31 NodeItem: remove dynamic name support for nodes 2016-08-21 12:46:21 +01:00
1b0b022281 NodeItem.findChild(): rewrite stream filter 2016-08-21 12:46:21 +01:00
2da1d9aa3d NodeItem: add deprecated to implementation of deprecated interface method 2016-08-21 12:27:50 +01:00
e9b43cb73c [BREAKING] NodeItem: require instantiation using Nodes
This breaks the existing API where NodeItem<T> could be instantiated directly.
2016-08-21 12:22:04 +01:00
51e8194db7 Nodes: add utility class to create Node instances 2016-08-21 12:22:04 +01:00
39721e77c1 pom.xml: add dependency on net.trajano.commons to utility class testing 2016-08-21 11:36:46 +01:00
f945af160a NodeItem: deprecate dynamic node names
With the aim of moving towards immutable objects, node shouldn't have
dynamic names. I've not found a use for them in my own projects.
2016-08-21 11:29:42 +01:00
5eb4090acf Merge pull request #13 from kemitix/ignore-remove-ide-files
Ignore remove ide files
2016-08-21 10:55:36 +01:00
bc5320b573 .gitignore: ignore intellij project files 2016-08-21 10:49:05 +01:00
8bcce3418d {.idea|*.iml}: remove intellij project files 2016-08-21 10:48:52 +01:00
3fcb8a8df9 Merge pull request #12 from kemitix/update-gitignore
Update .gitignore
2016-06-10 11:08:35 +01:00
680432614e Remove ignored files 2016-06-10 10:33:53 +01:00
8bb8c40368 Update .gitignore to use template 2016-06-10 10:33:53 +01:00
15a3cd9547 Merge pull request #11 from kemitix/use-coveralls
Report code coverage to coveralls.io
2016-06-03 16:55:22 +01:00
d04d1741c9 Report code coverage to coveralls.io 2016-06-03 16:48:49 +01:00
71789a0ac0 Merge branch release/0.3.0 into develop
Return optionals rather than nulls
2016-05-26 13:52:45 +01:00
39833edf27 pom.xml: version set to 0.4.0-SNAPSHOT 2016-05-26 13:52:45 +01:00
55981778b7 Merge branch release/0.3.0 into master
Return optionals rather than nulls
2016-05-26 13:52:43 +01:00
f4dfd1309c CHANGELOG 2016-05-26 13:52:43 +01:00
3f3f2efb7d pom.xml: version set to 0.3.0 2016-05-26 13:52:43 +01:00
801178381e Merge pull request #10 from kemitix/return-optionals
Return Optionals rather than nulls
2016-05-26 13:28:31 +01:00
1ea7802768 NodeItemTest: ensure that removeParent() removes the child from the parent too 2016-05-26 13:17:21 +01:00
136bc0b4ba NodeItemTest: ensure that when a child is removed from it's parent its parent is removed 2016-05-26 13:11:51 +01:00
d3b8fa721b NodeItemTest: check that parent is set when using NodeItem(data, supplier, parent) 2016-05-26 13:08:52 +01:00
6c13cd2735 Node.getParent(): returns any parent inside an Optional
Root nodes will return an empty Optional.
2016-05-26 13:03:32 +01:00
37562941f4 Node.getChildByName(): javadoc to note throws NodeException if child not found 2016-05-26 13:03:32 +01:00
41bd84b6f6 Node.getData(): nodes may be empty so return an Optional
Most tests used Node::getData as a name supplier for test fixtures.
In some cases these were not needed and have been removed. In others, where
there are used, they have been updated to get the content of the Optional.
If the Optional happens to be empty, which it shouldn't be in those cases,
then an error will occur and the test will, correctly, fail.
2016-05-26 13:03:25 +01:00
d0e6769126 NodeItem.insertInPath(): don't hide field 'name' 2016-05-25 14:23:33 +01:00
5d0de83aef NodeItem.insertInPath(): exception message includes name of conflicting node 2016-05-25 13:47:41 +01:00
3e687b9766 Merge branch release/0.2.0 into develop
Demo of full-path node name
insertInPath() uses setData()
Dynamic node names
New tests following mutation testing
Tidy the Node interface
Named nodes
Update code style
Drop lombok in production (still using it in test)
2016-05-25 11:44:52 +01:00
dc70ed0ddb pom.xml: version set to 0.3.0-SNAPSHOT 2016-05-25 11:44:52 +01:00
323fba13c4 Merge branch release/0.2.0 into master
Demo of full-path node name
insertInPath() uses setData()
Dynamic node names
New tests following mutation testing
Tidy the Node interface
Named nodes
Update code style
Drop lombok in production (still using it in test)
2016-05-25 11:44:51 +01:00
9348fcdf8f CHANGELOG 2016-05-25 11:44:50 +01:00
6a19dbda10 pom.xml: version set to 0.2.0 2016-05-25 11:44:50 +01:00
fbb2a206ba .idea/checkstyle-idea.xml: added 2016-05-24 23:31:54 +01:00
7398107dcc .idea/findbugs-idea.xml: added 2016-05-24 23:31:26 +01:00
c4ab0010d1 .idea: upgrade findbugs and assertion verification 2016-05-24 23:30:46 +01:00
e06feddec3 Merge pull request #9 from kemitix/demo-of-full-path-node-name
NodeItemTest: demonstrate using dynamic name supplier to generate nod…
2016-05-24 23:03:11 +01:00
aa4be5ebf1 Merge pull request #8 from kemitix/insertinpath-uses-setdata
insertInPath() uses setData() to merge nodes
2016-05-24 23:02:35 +01:00
3f9618c51e Merge pull request #3 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2016-05-24 22:39:26 +01:00
d82b0290a1 NodeItemTest: demonstrate using dynamic name supplier to generate node paths 2016-05-24 22:35:24 +01:00
94f7b5fb95 Merge pull request #7 from kemitix/dynamic-names
Dynamic names
2016-05-24 22:31:59 +01:00
eebd293633 NodeItem.insertInPath(): use setData() to when target is already in tree
Where an empty node is already found in the tree where we want to insert
a node, use the setData() method to place the data. This replaces the
previous process of attempting to swapping in the new node.
2016-05-24 22:16:35 +01:00
96ac0f720f Node.setName(): ensure that setting name to null enables the name supplier 2016-05-24 22:04:00 +01:00
7de6c5ad49 Node.getName(): generated each time called when using a name supplier
Previously the name was set when the node was created and only a call to
setName() would have changed it.

isNamed() uses the generated name, so this may change if the generated name
is even null or the empty string.
2016-05-24 22:03:14 +01:00
7ccef4e011 Merge pull request #6 from kemitix/mutation-testing
Additional tests after PIT Mutation testing
2016-05-24 16:55:44 +01:00
080d995ba0 NodeItemTest: more tests 2016-05-24 16:36:10 +01:00
c0bbadf119 Merge pull request #5 from kemitix/tidy-interface
Tidy interface
2016-05-24 15:22:29 +01:00
a31c4501ac Fix typos 2016-05-24 15:05:53 +01:00
f95029d348 Node.getChild(): method to get a child or throw an exception if not found 2016-05-24 14:44:03 +01:00