Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
6.8.0
Description
Current documentation sounds:
/**
- Gets the subset of the currently coupled
{@link Behavior}s that are of the provided type as a
* unmodifiable list. Returns an empty list rather than null if there are no behaviors coupled
* to this component.
*
* @param type
* The type or null for all
* @return The subset of the currently coupled behaviors that are of the provided type as a
* unmodifiable list or null
* @param <M>
* A class derived from IBehavior
*/
As you can see, the description is inconsistent with return doc. It should be "as an unmodifiable list" instead of "as a unmodifiable list or null", because Behaviors.getBehaviors(Class<M> type) never returns null. Please notice the typo as well ("a" vs. "an").
Moreover, the <M> param doc speaks about IBehavior, which was dropped in 1.5 (which is a pity in my opinion, but that's another thing). There should be "Behavior" instead of "IBehavior".
So the documentation should be:
/**
* Gets the subset of the currently coupled {@link Behavior}s that are of the provided type as a
- unmodifiable list. Returns an empty list rather than null if there are no behaviors coupled
- to this component.
- @param type
- The type or null for all
- @return The subset of the currently coupled behaviors that are of the provided type as an
- unmodifiable list
- @param <M>
- A class derived from Behavior
*/