/**
 * 
 */
package datastructures;

/**
 * @author Pavel Nichita
 *
 */
public class Attribute implements Comparable<Attribute>{
    private String attr;
    
    /**
     * Constructs a Null string. 
     */
    public Attribute() {
        // Manually generated default constructor.
    }
    
    
    /**
     * Initializes the attribute string with the value of attribute.
     * @param attribute A string representing the value of attribute.
     */
    public Attribute(String attribute) {
        this.attr = attribute;
    }
    
    /**
     * Initializes the attribute string with the value of obj.
     * @param obj An Attribute object.
     */
    public Attribute(Attribute obj) {
        attr = obj.getAttribute();
    }
    
    /**
     * Return the string with the value of Attribute.
     * @return the string with the value of Attribute.
     */
    public String getAttribute() {
        return attr;
    }

    /**
     * Sets the value of Attribute string.
     * @param attribute the value to be set of attribute.
     */
    public void setAttribute(String attribute) {
        this.attr = attribute;
    }
    
    /**
     * Compares two attributes lexicographically.
     *  
     * The comparison is based on the Unicode value of each character in the
     * attribute strings. The character sequence represented by this Attribute
     * object is compared lexicographically to the character sequence
     * represented by the argument obj. The result is a negative integer if
     * this Attribute object lexicographically precedes the argument attribute.
     * The result is a positive integer if this attribute object
     * lexicographically follows the argument attribute. The result is zero
     * if the attributes are equal; compareTo returns 0 exactly when the
     * equals(Object) method would return true. 
     * 
     * @param obj The string to be compared.
     * @return the value 0 if the argument attribute is equal to this attribute;
     * a value less than 0 if this attribute is lexicographically less than the
     * attribute argument; and a value greater than 0 if this attribute is
     * lexicographically greater than the attribute argument.
     */
    @Override
    public int compareTo(Attribute obj) {
        return attr.compareTo(obj.getAttribute());
    }

}

@@ -285,25 +285,24 @@
 .%0A    %7D%0A    
-%0A
     %0A    /**
@@ -363,32 +363,40 @@
 e of attribute.%0A
+     * %0A
      * @param at
@@ -611,16 +611,24 @@
 of obj.%0A
+     * %0A
      * @
@@ -808,24 +808,32 @@
  Attribute.%0A
+     * %0A
      * @retu
@@ -997,16 +997,24 @@
 string.%0A
+     * %0A
      * @
@@ -1112,32 +1112,32 @@
 ng attribute) %7B%0A
-
         this.att
@@ -1162,32 +1162,1958 @@
  %7D%0A    %0A    /**%0A
+     * Returns true if attribute is null o if length is 0, false otherwise.%0A     * %0A     * @return true if attribute is null o if length is 0, false otherwise.%0A     */%0A    public boolean isNull() %7B%0A        if ((attr == null) %7C%7C (attr.length() == 0))%0A            return true;%0A        return false;%0A    %7D%0A    %0A    /**%0A     * Returns a hash code for this attribute.%0A     * %0A     * The hash code for a Attribute object is%0A     * computed using the default implementations of Eclipse.%0A     * %0A     * @return a hash code value for this object.%0A     */%0A    @Override%0A    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = 1;%0A        result = prime * result%0A                + ((attr == null) ? 0 : attr.hashCode());%0A        return result;%0A    %7D%0A%0A    /**%0A     * Compares this attribute to the specified object.%0A     * %0A     *  The result is true if and only if the argument%0A     *  is not null and is a Attribute object that represents%0A     *  the same attribute string as this object.%0A     * %0A     * @param obj The object to compare this Attribute against.%0A     * @return true if the given object represents a Attribute%0A     * equivalent to this attribute, false otherwise.%0A     */%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if (this == obj)%0A            return true;%0A        if (obj == null)%0A            return false;%0A        if (getClass() != obj.getClass())%0A            return false;%0A        Attribute other = (Attribute) obj;%0A        if (attr == null %7C%7C attr == %22%22) %7B%0A            if (other.attr != null && other.attr != %22%22)%0A                return false;%0A        %7D else if (!attr.equals(other.attr))%0A            return false;%0A        return true;%0A    %7D%0A    %0A    /**%0A     * Returns the value of this attribute in string format.%0A     * %0A     * @return the value of this attribute in string format.%0A     */%0A    @Override%0A    public String toString() %7B%0A        return attr;%0A    %7D%0A    %0A    /**%0A
      * Compares 

Add methods isNull, hashCode, equals, toString