(no commit message)
[utils] / system / general / src / test / java / org / wamblee / system / core / IntegerComponent.java
index 83616744a8b2df02d2cfe71a55875f495136b767..0c45c75ddb117796e72f1075bf15c1ad9d4d2317 100644 (file)
@@ -1,12 +1,12 @@
 /*
- * Copyright 2007 the original author or authors.
- *
+ * Copyright 2005-2010 the original author or authors.
+ * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- *
+ * 
  *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  */
 package org.wamblee.system.core;
 
-import org.wamblee.system.core.AbstractComponent;
-import org.wamblee.system.core.DefaultProvidedInterface;
-import org.wamblee.system.core.ProvidedInterface;
-import org.wamblee.system.core.RequiredInterface;
-
 import org.wamblee.test.EventTracker;
 
-import javax.sql.DataSource;
-
-
 /**
- * DOCUMENT ME!
- *
+ * 
  * @author $author$
  * @version $Revision$
 */
+ */
 public class IntegerComponent extends AbstractComponent<Object> {
-    /**
-     * DOCUMENT ME!
-     */
     private EventTracker<String> tracker;
 
-    /**
-     * DOCUMENT ME!
-     */
     private double random;
 
     /**
@@ -51,8 +36,7 @@ public class IntegerComponent extends AbstractComponent<Object> {
 
     /**
      * Creates a new IntegerComponent object.
-     *
-     * @param aName DOCUMENT ME!
+     * 
      */
     public IntegerComponent(String aName) {
         this(aName, "");
@@ -60,9 +44,7 @@ public class IntegerComponent extends AbstractComponent<Object> {
 
     /**
      * Creates a new IntegerComponent object.
-     *
-     * @param aName DOCUMENT ME!
-     * @param aPrefix DOCUMENT ME!
+     * 
      */
     public IntegerComponent(String aName, String aPrefix) {
         super(aName, provided(aPrefix), new RequiredInterface[0]);
@@ -71,43 +53,22 @@ public class IntegerComponent extends AbstractComponent<Object> {
 
     /**
      * Creates a new IntegerComponent object.
-     *
-     * @param aTracker DOCUMENT ME!
+     * 
      */
     public IntegerComponent(EventTracker aTracker) {
         this();
         tracker = aTracker;
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aPrefix DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
     private static final ProvidedInterface[] provided(String aPrefix) {
-        return new ProvidedInterface[] {
-            new DefaultProvidedInterface(aPrefix + "integer", Integer.class)
-        };
+        return new ProvidedInterface[] { new DefaultProvidedInterface(aPrefix +
+            "integer", Integer.class) };
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
     public Integer getInteger() {
         return 2;
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aScope DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
     @Override
     protected Object doStart(Scope aScope) {
         addInterface(getProvidedInterfaces().get(1), getInteger(), aScope);
@@ -116,26 +77,16 @@ public class IntegerComponent extends AbstractComponent<Object> {
         return random;
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aRuntime DOCUMENT ME!
-     */
     @Override
     protected void doStop(Object aRuntime) {
         track("stop." + getName());
 
         if (random != (Double) aRuntime) {
-            throw new IllegalArgumentException("Wrong runtime: expected "
-                random + " but got " + aRuntime);
+            throw new IllegalArgumentException("Wrong runtime: expected " +
+                random + " but got " + aRuntime);
         }
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aString DOCUMENT ME!
-     */
     private void track(String aString) {
         if (tracker == null) {
             return;