jscience
  1. jscience
  2. JSCIENCE-163

The equals method in the VectorMeasure class always returns false

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: www
    • Labels:
      None

      Description

      The equals method in Object is overridden by javax.Measure to return equals if the unit and amount are equal.
      VectorMeasure returns a clone of the value for comparison, and since the amount is a vector, this will always return false, even for identical objects (where the == operator returns true).

      I suggest that the VectorMeasure equals method should be overridden to correct this.

      I have included source code that demonstrates the problem.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            stuart_nimmo
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 1 hour
              1h
              Remaining:
              Remaining Estimate - 1 hour
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified