Ignore:
Timestamp:
2003-05-27T15:57:37+12:00 (21 years ago)
Author:
kjdon
Message:

re-tabbed the code for java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/ElementWrapper.java

    r4293 r4366  
    66 */
    77public class ElementWrapper
    8     implements Comparable {
    9     /** The element as the data from this object. */
    10     private Node element = null;
    11     /** Constructor.
    12       * @param element The <strong>Node</strong> this object is wrapped around.
     8    implements Comparable {
     9    /** The element as the data from this object. */
     10    private Node element = null;
     11    /** Constructor.
     12     * @param element The <strong>Node</strong> this object is wrapped around.
    1313      */
    14     public ElementWrapper(Node element) {
    15           this.element = element;
    16     }
    17     /** Compare two objects for ordering.
     14    public ElementWrapper(Node element) {
     15    this.element = element;
     16    }
     17    /** Compare two objects for ordering.
    1818      * @param object The other <strong>Object</strong> to compare to.
    1919      * @return An <i>int</i> indicating the ordering as is String.compareTo
    2020      */
    21     public int compareTo(Object object) {
    22           if(object == null) {
    23                 return 1;
    24           }
    25           return toString().compareTo(object.toString());
    26     }
    27     /** Compare two objects for equality.
     21    public int compareTo(Object object) {
     22    if(object == null) {
     23        return 1;
     24    }
     25    return toString().compareTo(object.toString());
     26    }
     27    /** Compare two objects for equality.
    2828      * @param object The <strong>Object</strong> to compare to.
    2929      * @return <i>true</i> if the objects are equal, <i>false</i> otherwise.
    3030      */
    31     public boolean equals(Object object) {
    32           if(compareTo(object) == 0) {
    33                 return true;
    34           }
    35           return false;
    36     }
    37     /** Retrieve the name of the element.
     31    public boolean equals(Object object) {
     32    if(compareTo(object) == 0) {
     33        return true;
     34    }
     35    return false;
     36    }
     37    /** Retrieve the name of the element.
    3838      * @return The fully qualified name as a <strong>String</strong>.
    3939      * @see org.greenstone.gatherer.msm.MSMUtils
    4040      */
    41     public String name() {
    42           return MSMUtils.getFullName((Element)element);
    43     }
    44     /** Retrieve a textual representation of this object.
     41    public String name() {
     42    return MSMUtils.getFullName((Element)element);
     43    }
     44    /** Retrieve a textual representation of this object.
    4545      * @return A <strong>String</strong>.
    4646      * @see org.greenstone.gatherer.msm.MSMUtils
    4747      */
    48     public String toString() {
    49           return MSMUtils.getIdentifier(element) + ": " + MSMUtils.getDescription(element);
    50     }
     48    public String toString() {
     49    return MSMUtils.getIdentifier(element) + ": " + MSMUtils.getDescription(element);
     50    }
    5151}
Note: See TracChangeset for help on using the changeset viewer.