Coverage Report - net.sf.jolene.dom.Input
 
Classes in this File Line Coverage Branch Coverage Complexity
Input
100%
13/13
N/A
0
 
 1  
 /*
 2  
  * Created on Feb 8, 2004
 3  
 */
 4  
 package net.sf.jolene.dom;
 5  
 
 6  
 
 7  
 /**
 8  
  * An input field in a html document. Usually used for entry fields, hidden fields or buttons.
 9  
  * Use CheckBox and Radio for checkboxes and radio buttons.
 10  
  *
 11  
  * @author Dan Howard
 12  
  */
 13  5
 public final class Input extends HTMLElement {
 14  
 
 15  
     /**
 16  
      * Default constructor.
 17  
      */
 18  135
     public Input() {
 19  135
     }
 20  
 
 21  
     /**
 22  
      * Construct an input object with the specified name.
 23  
      *
 24  
      * @param name name of the input.
 25  
      */
 26  1
     public Input(String name) {
 27  1
         setName(name);
 28  1
     }
 29  
 
 30  
     /**
 31  
      * Returns a clone of the input object.
 32  
      *
 33  
      * @return Input object.
 34  
      */
 35  
     @Override
 36  
     public Input clone() {
 37  5
         return (Input) super.clone();
 38  
     }
 39  
 
 40  
     /**
 41  
      * Sets the name of the input object.
 42  
      *
 43  
      * @param name name of the input.
 44  
      */
 45  
     @Override
 46  
     public void setName(String name) {
 47  119
         super.setName(name);
 48  119
         setAttribute("name", name);
 49  119
     }
 50  
 
 51  
 
 52  
     /**
 53  
      * Sets the value of the input object.
 54  
      *
 55  
      * @param value value of the input.
 56  
      */
 57  
     @Override
 58  
     public void setValue(String value) {
 59  90
         super.setValue(value);
 60  90
         setAttribute("value", value);
 61  90
     }
 62  
 }