Compare field to this and return < > or = (-,+,0).
@return compare value.
511722
public int compareTo(Field field)
    {
        if (field instanceof BaseField) if (!this.isSameType((BaseField)field))
            return super.compareTo(field);
        m_calendar.set(DBConstants.FIRST_YEAR, Calendar.JANUARY, 1, 0, 0, 0);
        java.util.Date dateSmall = m_calendar.getTime();
        java.util.Date time1 = dateSmall;
        java.util.Date time2 = dateSmall;
        java.util.Date dateValue = (java.util.Date)this.getData();  // Get the physical data
        if (dateValue != null)
            time1 = dateValue;
        dateValue = (java.util.Date)field.getData();    // Get the physical data
        if (dateValue != null)
            time2 = dateValue;
        return time1.compareTo(time2);
    }
1014955
@Override
    public int compareTo(final ColumnMapping o) {
        
        if(this.number == o.number) {
            return this.field.getName().compareTo(o.field.getName());
            
        } else {
            return Integer.compare(number, o.number);
        }
        
    }
598217
public Object getBreakValue()
    {
        BaseField field = null;
        if (this.getMainRecord() != null)
            field = this.getMainRecord().getKeyArea().getField(0);
        if (field != null)
            if (!(field instanceof CounterField))
                return field.getData();
        return INITIAL_VALUE;   // Override this
    }
719272
public int compareTo(Object o) {
    long thisValue = this.value;
    long thatValue = ((LongWritable)o).value;
    return (thisValue<thatValue ? -1 : (thisValue==thatValue ? 0 : 1));
  }
1136047
private int getFieldValueAsInt(final DatatypeConstants.Field field) {
        Number n = getField(field);
        if (n != null) {
            return n.intValue();
        }
        return 0;
    }
558960
@Override
	public int compareTo(ValueArray<ByteValue> o) {
		ByteValueArray other = (ByteValueArray) o;

		int min = Math.min(position, other.position);
		for (int i = 0; i < min; i++) {
			int cmp = Byte.compare(data[i], other.data[i]);

			if (cmp != 0) {
				return cmp;
			}
		}

		return Integer.compare(position, other.position);
	}
885899
function compareNumericField(field, a, b) {
    var nodeA = (a[1]);
    var nodeB = (b[1]);
    return nodeA[field] - nodeB[field];
  }
1249671
public static Comparator getComparator()
    {
        return new Comparator()
        {
            public int compare(Object o1, Object o2)
            {
                FieldDescriptor fmd1 = (FieldDescriptor) o1;
                FieldDescriptor fmd2 = (FieldDescriptor) o2;
                if (fmd1.getColNo() < fmd2.getColNo())
                {
                    return -1;
                }
                else if (fmd1.getColNo() > fmd2.getColNo())
                {
                    return 1;
                }
                else
                {
                    return 0;
                }
            }
        };
    }
1298188
public static int compare( String s1, String s2)
	{
		if (s1 == null && s2 == null)
		{
			return 0;
		}
		else if (s1 == null && s2 != null)
		{
			return -1;
		}
		else if (s1 != null && s2 == null)
		{
			return 1;
		}
		else
		{
			return s1.compareTo(s2);
		}
	}
802281
public double getValue()
    {           // Get this field's value
        if (m_data == null)
            return 0;
        double doubleField = Double.valueOf((String)m_data).doubleValue();
        return doubleField;
    }
399216
public int compare(Attribute a, Attribute b) {
        int result = a.getId().toString().compareTo(b.getId().toString());

        if (result == 0) {
            result = a.getType().toString().compareTo(b.getType().toString());
        } else {
            return result;
        }

        if (result == 0) {
            result = a.getValue().encode().compareTo(b.getValue().encode());
        } else {
            return result;
        }

        if (result == 0
                && (a.getIssueInstant() != null || b.getIssueInstant() != null)) {
            if (a.getIssueInstant() == null && b.getIssueInstant() == null) {
                result = 0;
            } else if (a.getIssueInstant() != null
                    && b.getIssueInstant() == null) {
                result = 1;
            } else if (a.getIssueInstant() == null
                    && b.getIssueInstant() != null) {
                result = -1;
            } else {
                result =
                        a.getIssueInstant().encode().compareTo(b
                                .getIssueInstant().encode());
            }
        }

        return result;
    }
881245
@Override
	public int compareTo(LongValue o) {
		final long other = o.value;
		return this.value < other ? -1 : this.value > other ? 1 : 0;
	}
1032341
public int compare(String a, String b) {

        int i;

        if (collator == null) {
            i = a.compareTo(b);
        } else {
            i = collator.compare(a, b);
        }

        return (i == 0) ? 0
                        : (i < 0 ? -1
                                 : 1);
    }
1218278
@Override
    public int compareTo(final Record other) {
        final URI thisID = getID();
        final URI otherID = other.getID();
        if (thisID == null) {
            return otherID == null ? 0 : -1;
        } else {
            return otherID == null ? 1 : thisID.stringValue().compareTo(otherID.stringValue());
        }
    }
793181
public int compareTo(Object aOther)
   {
      if(aOther == null )
         return 1;
      
      if(aOther == this)
         return 0;
      
      Nameable other = (Nameable)aOther;
      
      return name.compareTo(other.getName());
   }
756047
public Object evaluate()
  {
    if( !isCompileTimeConstant() )
    {
      return super.evaluate();
    }

    return evaluate( getType(), getLHS().evaluate(), getRHS().evaluate(), getLHS().getType(), getRHS().getType(), isAdditive(), false, !getType().equals( JavaTypes.STRING() ) );
  }
1341871
public int compareTo(Object o) {
        float thisValue = this.value;
        float thatValue = ((FloatWritable) o).value;
        return (thisValue < thatValue ? -1 : (thisValue == thatValue ? 0 : 1));
    }