Author: rwhitcomb Date: Mon Oct 30 17:04:17 2023 New Revision: 1913449 URL: http://svn.apache.org/viewvc?rev=1913449&view=rev Log: Update documentation in two functional/monad classes.
Modified: pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java pivot/trunk/core/src/org/apache/pivot/functional/monad/MonadicOperations.java Modified: pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java?rev=1913449&r1=1913448&r2=1913449&view=diff ============================================================================== --- pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java (original) +++ pivot/trunk/core/src/org/apache/pivot/functional/monad/Monad.java Mon Oct 30 17:04:17 2023 @@ -17,16 +17,25 @@ package org.apache.pivot.functional.monad; /** - * Definition of a generic Monad. + * Definition of a generic Monad, which is a type that wraps another type and + * gives some form of quality to the underlying type (see + * <a href="https://en.wikipedia.org/wiki/Monad_(functional_programming)"> + * https://en.wikipedia.org/wiki/Monad_(functional_programming)</a>). + * * @param <T> The underlying type wrapped by this Monad. */ public abstract class Monad<T> implements MonadicOperations<T> { - /** Default constructor. */ + /** + * Default constructor. + */ protected Monad() { // no-op } + /** + * {@inheritDoc} + */ @Override public String toString() { return "Monad(" + getClass().getTypeParameters()[0].getName() + ")"; Modified: pivot/trunk/core/src/org/apache/pivot/functional/monad/MonadicOperations.java URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/functional/monad/MonadicOperations.java?rev=1913449&r1=1913448&r2=1913449&view=diff ============================================================================== --- pivot/trunk/core/src/org/apache/pivot/functional/monad/MonadicOperations.java (original) +++ pivot/trunk/core/src/org/apache/pivot/functional/monad/MonadicOperations.java Mon Oct 30 17:04:17 2023 @@ -18,13 +18,12 @@ package org.apache.pivot.functional.mona /** * Definition of generic Monadic methods. + * <p> For future development: check on adding other abstract (generic, typical of Monads: + * apply, unit, map, flatten, etc) methods here and see what to implement in Option and in Try ...) * * @param <T> The wrapped type to which this operation is to be applied. */ @SuppressWarnings("unused") public interface MonadicOperations<T> { -// TODO: check if add other abstract (generic, typical of Monads: apply, unit, map, flatten, etc) -// methods here (MonadicInterface), and see what to implement in Option and in Try ... - }