Commits

Sebastian Sdorra committed f4a54f9

improve javadoc and implement toString method

Comments (0)

Files changed (2)

scm-core/src/main/java/sonia/scm/group/GroupEvent.java

 
 //~--- non-JDK imports --------------------------------------------------------
 
+import com.google.common.base.Objects;
+
 import sonia.scm.HandlerEvent;
 import sonia.scm.event.HandlerEventBase;
 
 {
 
   /**
-   * Constructs ...
+   * Constructs new group event
    *
    *
-   * @param group
-   * @param eventType
+   * @param group changed group
+   * @param eventType type of the event
    */
   public GroupEvent(Group group, HandlerEvent eventType)
   {
     this.eventType = eventType;
   }
 
+  //~--- methods --------------------------------------------------------------
+
+  /**
+   * {@inheritDoc}
+   *
+   *
+   * @return
+   */
+  @Override
+  public String toString()
+  {
+    //J-
+    return Objects.toStringHelper(this)
+                  .add("eventType", eventType)
+                  .add("group", group)
+                  .toString();
+    //J+
+  }
+
   //~--- get methods ----------------------------------------------------------
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return
   }
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return
 
   //~--- fields ---------------------------------------------------------------
 
-  /** Field description */
+  /** event type */
   private HandlerEvent eventType;
 
-  /** Field description */
+  /** changed group */
   private Group group;
 }

scm-core/src/main/java/sonia/scm/user/UserEvent.java

 {
 
   /**
-   * Constructs ...
+   * Constructs new UserEvent.
    *
    *
-   * @param user
-   * @param eventType
+   * @param user changed user
+   * @param eventType type of the event
    */
   public UserEvent(User user, HandlerEvent eventType)
   {
   //~--- methods --------------------------------------------------------------
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return
   //~--- get methods ----------------------------------------------------------
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return
   }
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return
 
   //~--- fields ---------------------------------------------------------------
 
-  /** Field description */
+  /** type of the event */
   private HandlerEvent eventType;
 
-  /** Field description */
+  /** changed user */
   private User user;
 }