/*
  $Id$

  Copyright (C) 2003-2010 Virginia Tech.
  All rights reserved.

  SEE LICENSE FOR MORE INFORMATION

  Author:  Middleware Services
  Email:   middleware@vt.edu
  Version: $Revision$
  Updated: $Date$
*/
package edu.vt.middleware.password;

/**
 * <code>RuleResult</code> provides common implementation for password rule
 * result implementations.
 *
 * @param <T> type of password rule result details
 *
 * @author  Middleware Services
 * @version  $Revision$ $Date$
 */
public class RuleResult<T>
{

  /** whether password rule was successful. */
  protected boolean valid;

  /** details associated with a password rule result. */
  protected T details;



  /**
   * Returns whether the result of the rule verification is a valid password.
   *
   * @return  valid password for this rule
   */
  public boolean isValid()
  {
    return this.valid;
  }


  /**
   * Sets whether the result of the rule verification is a valid password.
   *
   * @param  b  valid password for this rule
   */
  public void setValid(final boolean b)
  {
    this.valid = b;
  }


  /**
   * Returns any details associated with the rule verification. May be null.
   *
   * @return  T  rule result details
   */
  public T getDetails()
  {
    return this.details;
  }


  /**
   * Sets any details associated with the rule verification.
   *
   * @param  t  rule result details
   */
  public void setDetails(final T t)
  {
    this.details = t;
  }
}

@@ -664,16 +664,362 @@
 ils;%0A%0A%0A%0A
+  /** Default constructor. */%0A  public RuleResult() %7B%7D%0A%0A%0A  /**%0A   * Creates a new %3Ccode%3ERuleResult%3C/code%3E with the supplied validity and%0A   * details.%0A   *%0A   * @param  b  result validity%0A   * @param  t  details associated with this result%0A   */%0A  public RuleResult(final boolean b, final T t)%0A  %7B%0A    this.valid = b;%0A    this.details = t;%0A  %7D%0A%0A%0A
   /**%0A  

Add convenience constructor.