https://github.com/clickermonkey/dependz
A dependency analysis utility in Java which uses topological sorting to order values based on their dependencies.
https://github.com/clickermonkey/dependz
Last synced: 4 months ago
JSON representation
A dependency analysis utility in Java which uses topological sorting to order values based on their dependencies.
- Host: GitHub
- URL: https://github.com/clickermonkey/dependz
- Owner: ClickerMonkey
- License: osl-3.0
- Created: 2014-01-15T19:59:10.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-24T12:30:40.000Z (about 12 years ago)
- Last Synced: 2025-01-27T10:23:14.531Z (about 1 year ago)
- Language: Java
- Size: 246 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Dependz
=======

A dependency analysis utility in Java which uses topological sorting to order values based on their dependencies.
There are two methods to build a DependencyGraph, one with DependencyNodes (which requires all DependencyNode references to be created ahead of time) or by using DependencyMap which can use an arbitrary key to map dependencies between values.
#### Example
```java
DependencyMap map = new DependencyMap();
map.put( "value0", 0 );
map.put( "value1", 1 );
map.put( "value2", 2 );
map.put( "value3", 3 );
map.put( "value4", 4 );
map.addDependency( "value0", "value1" ); // value0 depends on value1
map.addDependency( "value2", "value0" );
map.addDependency( "value1", "value3" );
map.addDependency( "value1", "value4" );
DependencyAnalyzer analyzer = map.toAnalyzer();
assertTrue( analyzer.isValid() );
assertEquals( Arrays.asList( 3, 4, 1, 0, 2 ), graph.getOrdered() );
```
#### Builds
- [dependz-1.0.jar](https://github.com/ClickerMonkey/Dependz/raw/master/build/dependz-1.0.jar)
- [dependz-src-1.0.jar](https://github.com/ClickerMonkey/Dependz/raw/master/build/dependz-1.0-src.jar) - includes source code
#### Projects using Dependz
- [Rekord](https://github.com/ClickerMonkey/Rekord)