Skip to content

Commit

Permalink
Make it transparent in the docs that TreeUtils.getMaxTimepoint() retu…
Browse files Browse the repository at this point in the history
…rn 0 in case of an empty model.

* Update javadocs and unit test accordingly
  • Loading branch information
stefanhahmann committed Jun 7, 2024
1 parent b93f8b2 commit 19ea45d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/mastodon/util/TreeUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ public static int getMinTimepoint( final Model model )
}

/**
* Gets the maximum timepoint in the given {@link Model} at which at least one {@link Spot} exists in the Model.
* Gets the maximum time point in the given {@link Model} at which at least one {@link Spot} exists in the Model.
* <br>
* If the model is empty, returns 0.
* @param model the {@link Model}
* @return the timepoint
*/
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/mastodon/util/TreeUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public void testGetMaxTimepoint()
{
assertEquals( 3, TreeUtils.getMaxTimepoint( new ExampleGraph1().getModel() ) );
assertEquals( 7, TreeUtils.getMaxTimepoint( new ExampleGraph2().getModel() ) );
assertEquals( 0, TreeUtils.getMaxTimepoint( new Model() ) );
}

@Test
Expand Down

0 comments on commit 19ea45d

Please sign in to comment.