CVS Compare Problem

Hello,
I'm using JDev 10.1.0.3.4.3673 and CVSNT2.0.8
When I try to compare a file with another revision, the left filter defaults to the previous revision, and the right filter defaults to the head revision, but underneath the two filters where I expect to see the two source files and the differences from the comparison I just see a white background with the message 'Compare Not Available'.
Does anybody have any suggestions how to solve this? Am I doing something wrong? This is really a show stopper for me.
JFYI If I use the feature 'Compare With Other File', it works as expected. But of course my goal is to compare with other CVS revisions to see what changes a colleague has made.

Thanks again for your help.
I see this problem on all files that I try to compare from CVS. Below is the ouput from 'cvs log' from the command prompt for an example file. The date format is exactly as you described:
RCS file: /local/reps/acc-dm/measdb/measdb-client-api/src/java/cern/measurement/MeasurementManager.java,v
Working file: MeasurementManager.java
head: 1.10
branch:
locks: strict
access list:
symbolic names:
V2_0_1: 1.10
V2_0_0: 1.10
V1_5_14: 1.9
V1_5_13: 1.9
V1_5_12: 1.9
V1_5_11: 1.9
V1_5_10: 1.7
V1_5_9: 1.6
V1_5_8: 1.6
V1_5_7: 1.6
V1_5_6: 1.6
V1_5_5: 1.6
V1_5_4: 1.6
V1_5_3: 1.5
V1_5_2: 1.5
V1_5_1: 1.5
V1_5_0: 1.4
V1_4_0: 1.3
V1_3_0: 1.2
V1_2_1: 1.1.1.1
V1_2_0: 1.1.1.1
V1_1_0: 1.1.1.1
V1_0_1: 1.1.1.1
V1_0: 1.1.1.1
arelease: 1.1.1.1
avendor: 1.1.1
keyword substitution: kv
total revisions: 11; selected revisions: 11
description:
revision 1.10
date: 2006-06-08 15:06:32 +0000; author: konkere; state: Exp; lines: +172 -107; commitid: lnQP1pTMGnOrhdAr;
JMON-52.
Refactoring to generalize the fundamental and measurement variable behaviour and handling
revision 1.9
date: 2006-04-07 09:57:02 +0000; author: cdroderi; state: Exp; lines: +76 -16; commitid: AiECvh7J3qGRydsr;
New Fundamental Variable Features, and SavedVariableList for integration with
Set Of The Day.
revision 1.8
date: 2006-01-25 18:19:54 +0000; author: cdroderi; state: Exp; lines: +3 -4;
Added additional debug information to verify clearing of timeseries data
revision 1.7
date: 2006-01-17 14:33:53 +0000; author: cdroderi; state: Exp; lines: +29 -0;
[no comments]
revision 1.6
date: 2005-09-15 20:12:15 +0000; author: cdroderi; state: Exp; lines: +0 -0;
[no comments]
revision 1.5
date: 2005-09-12 08:01:07 +0000; author: cdroderi; state: Exp; lines: +2 -2;
Extended MetaVariableSet extraction using MetaHierarchy to include all nodes under the node represented by the given hierarchy.
revision 1.4
date: 2005-08-30 21:13:04 +0000; author: cdroderi; state: Exp; lines: +24 -3;
Limited the variable ownership and registration checks to once per session unless variables are added or removed from a variable set.
revision 1.3
date: 2005-08-30 14:25:10 +0000; author: cdroderi; state: Exp; lines: +50 -3;
New methods to read MetaVariableSet objects using a given MetaVariable name pattern or MetaHierarchy to filter the size of the returned set.
revision 1.2
date: 2005-08-23 14:16:25 +0000; author: cdroderi; state: Exp; lines: +19 -15;
Bug fix for writing data for variables with no time series data. Merge data when duplicates are found.
revision 1.1
date: 2005-06-01 17:52:43 +0000; author: cdroderi; state: Exp;
branches: 1.1.1;
Initial revision
revision 1.1.1.1
date: 2005-06-01 17:52:43 +0000; author: cdroderi; state: Exp; lines: +0 -0;
no message
=============================================================================

Similar Messages

  • TreeSet Comparator problem

    I've been working on a pathfinding algorithm and have been using a TreeSet with a custom comparator, but seem to have run into a problem. I'm under the assumption that a set should only contain one of each item based on the comparator. For some reason, when I do certain test cases the TreeSet will contain duplicate values. I specify that the values are equal if x == x and y == y, but somehow multiple x,y pairs are contained in the set. I use TreeSet.conatins() to determine if I should put the item in the list, but for some reason even if they share the same x,y pair it puts the same item in the list. Also, on other test cases its having trouble putting the items in the correct order. A pair of coordinates with a higher F value is in the front of the list when it should be in the back. If anyone has some suggestions i would greatly appreciate it. This is my code for the comparator. Maybe I'm doing something wrong and fresh set of eyes could help. This is my first time working with them and I'm not sure if I've made a tiny mistake or not.
    This is the custom comparator class I've implemented
        private class AStarNodeComparator implements Comparator<AStarNode>{
            public int compare(AStarNode o1, AStarNode o2) {
                return (o1.compareTo(o2));
        }And this is the compareTo, equals and hashCode method I've used for my AStarNode
        @Override
        public boolean equals(Object o){
            return(o instanceof AStarNode && this.compareTo((AStarNode)o) == 0);
        @Override
        public int hashCode() {
            int hash = 3;
            hash = 83 * hash + this.x;
            hash = 83 * hash + this.y;
            return hash;
        public int compareTo(AStarNode t) {
            if(this.x == t.getX() && this.y == t.getY()){
                return 0;
            else if(this.f < t.getF()){
                return -1;
            else{
                return 1;
        }If anyone has an idea on why this isn't sorting corectly and why it has duplicate items I would appreciate it.

    Would that exclude a value from the tree if the x and y didnt equal but the f values did? Say 1,3 = 110 and 1,2 = 110. Would it exclude one of the coordinates with that final return 0 at the end?No. It's the most minor key. It sorts items with equal (x,y) pairs only.
    I'm trying to keep duplicate x,y pairs out and sort them by f values at the same time.That is a contradiction in terms. If they are out how can you sort them? You have a major conceptual confusion here.
    Hmm would their be a different data structure I could use that would efficiently let me store them using the x,y coordinates as positions and then find the smallest one?It's not a question of which data structure, it's a question of how you are defining your ordering.
    I think your comparator should look like this:
    // Major key is 'x'
    if (this.x > that.x)
      return 1;
    if (this.x < that.x)
      return -1;
    // Sub-major key is 'y'
    if (this.y > that.y)
      return 1;
    if (this.y < that.y)
      return -1;
    // minor key is 'f'
    if (this.f > that.f)
      return 1;
    if (this.f < that.f)
      return -1;
    // Everything is equal
    return 0;As you are using a TreeSet you can throw away your hashCode() method. Otherwise it should take the 'f' value into account too.

  • String compare problem

    I try to compare 2 strings with compareTo/equalTo, but it's not working, those 2 funcs always return ture.
    public boolean chMark(String name, String test, String newMark)
              boolean flag = false;
              for(int i = 0; i < course.getNumOfStd(); i++)
                   if(course.getStd().getName().compareTo(name)==0)//here is problem;
                        Student tempStd = course.getStd()[i];
                        for(int j = 0; j < tempStd.getMark().getNumOfTests(); j++)
                        if(tempStd.getMark().getTestArray()[j].getTitle().compareTo(test)==0);//here is problem;
                             int mark = Integer.parseInt(newMark);                    }
              return flag;
    Can anybody tell me why?
    REGARDS,
    Elton

    equals() would read more naturally than compareTo()==0. But, in
    either case, use System.out.println() to write the two strings before
    you compare them. This is to check that you are comparing what
    you think you're comparing.System.out.println("name from course is " + course.getStd().getName());
    System.out.println("name is " + name);
    if(course.getStd()[i].getName().compareTo(name)==0)//here is problem;
    System.out.println("name from couse and name compared equal");
    // etc

  • Comparable problem with eclipse

    I want to use "Comparable" in eclipse, but always has a problem with a steatment that " The type Comparable is not generic; it cannot be parameterized with arguments <Node>".
    program is here:
    public class Node implements Comparable<Node>
         public int value;
         public boolean LeftchildSent; //used for checking if leftchild sent the value to the node at last round
         public boolean RightchildSent; //...
         public boolean ParentSent; //...
         //constructor
         public Node(int value, boolean LeftchildSent, boolean RightchildSent, boolean ParentSent, Node left, Node right)
              this.value = value;
              this.LeftchildSent = false;
              this.RightchildSent = false;
              this.ParentSent = false;
         //implements comparable
         public int ComparableTo(Node n)
              if(value < n.value) return -1;
              if(value == n.value) return 0;
              if(value > n.value) return 1;
    }anybody help, thanks very much

    Be sure to:
    1- Use a JRE System Library 5.0+ for your project.
    (Properties / Java Build Path / Libraries)
    2- Use a compiler compliance level 5.0+ for your project.
    (Properties / Java Compiler / Compiler Compliance Level)
    3- Change your last method to:    public int compareTo(Node n) // *** bad name used
            if(value < n.value) return -1;
            if(value > n.value) return 1;
            return 0; // *** be sure to have a return statement
        }or better:     public int compareTo(Node n)
            return value - n.value;
        }

  • Cvs checkout problem

    Hi,
    after I checkout successfully a folder from the repository to my local project,
    the files are all showed 'out of sync'
    even if I commit a change, they remain out of sync, and it should be 'up to date'
    I use jdev903 and cvsnt local in the same machine
    thanks Diego

    We had this problem in April when the time changed. All or most state icons showed as changed even though no files were changed. Our workaround was to apply the recent version of CVS and set our client machines' times to a timezone before ours (Atlantic instead of Eastern). Now that the time changed back again this past weekend, we have the same problem.
    No combination of different time zones, with or without daylight savings turned on, seems to bring the icons into sync. We check out a module from CVS and many of the icons appear as changed. The CVS directory JDev file shows a time calibration adjustment in some directories but not in others. We are using JDev 9.0.3.2 but have the same problem in 9.0.5.1. CVS 2.0.48 (2.0.58 doesn't work at all).
    Anyone have this problem and/or have any ideas?

  • CVS login problem

    We have CVS repository installed in port 2402 and we can not login into it from JDev.
    No problem accesing from command line but no way to do it from JDev.
    We are having a 'no such repository' error always we try to login. We've tried with port in CVSROOT string, without it, setting CVS_PORT and CVS_CLIENT_PORT ... I think we've tried every sintax and haven't could login.
    We are using CVS v1.1.5
    Theese are the messages we get:
    Concurrent Versions System (CVS) 1.11.5 (client)
    Copyright (c) 1989-2002 Brian Berliner, david d `zoo' zuhn,
    Jeff Polk, and other authors
    CVS may be copied only under the terms of the GNU General Public License,
    a copy of which can be found with the CVS distribution kit.
    cvs client> [:pserver:juan@marty:/cvs/cvs_eureka/rep_eureka] password server login failed.
    cvs client> [:pserver:juan@marty:2402:/cvs/cvs_eureka/rep_eureka] password server login failed.
    cvs client> [:pserver:juan@marty:2402/cvs/cvs_eureka/rep_eureka] password server login failed.

    I am an JDev Oracle IDE     9.0.3.10.35 and am having similar problems with CVS.
    I have tried opening a command window first and logging into CVS (which works) with the following format
    Logging in to :pserver:[email protected]:2401/datanet/apps
    When I try same in JBuilder it won't authenticate, I am on Windows2000 the pserver is on a Unix style box.
    cvs client> [:pserver:[email protected]:2401/datanet/apps] password server login failed.
    Is there a work-around please?

  • Import from CVS project problem.

    Hi,
    I can not get the content in bin folder after I import files
    from CVS project. the bin folder is empty,
    I get 'The page cannot be found' error when I run the
    application. I can not use the code to generate files in bin
    folder.
    How to fix the problem?
    Thanks
    Mark

    Did you try to run export/import from commands? or some kinda GUI tool?
    If you use import/export, you can find them from Oracle syntax.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14215/toc.htm

  • TreeSet and Comparator problem

    Hi all ,
    I am using jdk1.3 , jbuilder4.0 , Apache Tomcat 1.3.14 and Window 98 and Access Database.
    I have comparator code below which give me some problem
    public int compare(Object x, Object y) {
    CompanyJB a = (CompanyJB)x , b = (CompanyJB)y;
    double aMinratio = a.getMinratio();
    double bMinratio = b.getMinratio();
    int aCompid = a.getCompanyid();
    int bCompid = b.getCompanyid();
    String aRankstr = a.getRank();
    String bRankstr = b.getRank();
    int tmp;
    tmp = new Integer(aCompid).compareTo(new Integer(bCompid));
    if (tmp == 0) {
    return tmp;
    tmp = a.getRank().compareTo(b.getRank());
    if (tmp !=0) {
    return tmp;
    tmp = new Double(a.getMinratio()).compareTo(new Double(b.getMinratio()));
    if (tmp !=0) {
    return tmp;
    return new Double(a.getMinratio()).compareTo(new Double(b.getMinratio()));
    Client source code below :
    TreeSet list2 = new TreeSet(new test());
    //list2.add(new test(2,1.9,4.2,"NA")); // 1
    list2.add(new test(11,8.5,8.5,"2")); // 3
    list2.add(new test(1,0.6,0.6,"NA")); // 2
    list2.add(new test(11,2.5,2.3,"NA")); // 4
    list2.add(new test(12,0.3,0.3,"1")); // 5
    list2.add(new test(2,1.9,1.2,"NA"));
    list2.add(new test(12,0.9,0.9,"NA"));
    Iterator iterator2 = list2.iterator();
    while(iterator2.hasNext()){
    System.out.println(((test)iterator2.next()).getCompanyid());
    My problem is that the print out display duplicate company id "12" in the set.
    It should not display the duplicate company id in the set.
    What is the problem here ?? Anybody have ideas ??

    Actually, a Set, as defined in java.util.Set, should not contain duplicate members. With SortedSets, however, there must also be consistency between equals() and the compareTo() (or Comparator.compare()). In other words, equal objects must sort to the same or an adjacent place in order for the Set semantics to work.
    In your example, "equal" objects can appear in completely different positions in the sort order, throwing off this consistency. When adding, it's traversing the tree in Rank,MinRatio order. If by chance it runs across a node that has the same company id, it stops and leaves the trees alone (as it does with id=11). If you try graphing the tree out by hand using your compare() as left/right criteria (negative left, positive right, 0 don't change), it'll become immediately clear what's happening.
    Also of interest: you'll find that you can't add test(34,1.9,1.2,"NA") to the list: because it's Rank and MinOrder is the same as the id=2 entry, it'll never get added.

  • CVS integration problem in JDeveloper 9.0.3

    Once I do a checkout all the files are marked as 'changed' immediately (by a 'black star' instead of 'an orange ball'). This problem exists on 2 pcs, and everything works fine on another one.
    CVS support in the JDeveloper 10g Preview works well in all 3 mashines.
    The JVM version and system date are same on all the pcs. I just copied the JDeveloper directory from a 'working pc' to a one where the problem exist, and it persisted.
    I'm looking forward to your hints!

    Add
    AddVMOption -Duser.region=US
    AddVMOption -Duser.language=en
    to your jdev.conf file.
    Sascha

  • JDeveloper 9.0.3.2 CVS update problem

    Hello all,
    we have got a Problem with the CVS integration of JDeveloper.
    A developer adds and commits a new file to the CVS.
    Another developer has checked out the tree before and now wants to perform an update
    on the complete project. It is not possible to get the new file because JDeveloper
    walks through the project directories performs an update on every single file:
    $ cd d:\tmp\MyTest\
    $ cvs -q update MyTest.jpr
    $ cd d:\tmp\MyTest\src
    $ cvs -q update Class1.java Class2.java Class3.java ...
    We only managed to get the new file when we select "Perform a clean update by file deletion"
    in the update dialog or if we configured an external Tool which performs �n cvs update
    in the project directory.
    Any ideas ?

    Hi,
    To update the folder in 9.0.3, you need to use the File->Source Control->Update Folder menu item.
    In 10g, the default behavior is to update the project directory.
    Thanks,
    Brian
    JDev Team

  • CVS NT problem

    Hello every body,
    we are developing webapplication by using Eclipse 3.2 and verson control as CVSNT .when i update my project from CVS repositry am getting Exception as:
    Could not connect to:pserver:INDUSCORPINDIA\AnilPrasadReddyM@localhost:/Java/cvs/cvsrepo:Socket Exception : Connection reset
    Plz help hoe to resolve.
    Regards,
    Anil

    I tried in so many forums ,but i didn't get proper
    reponses I searched Google for that exception and the solution seems to be a "reboot". Sounds silly but such things work with Windows! :D
    And here's a link on how to configure CVSNT. It might help.
    http://www.cvsnt.org/wiki/InstallationTips#head-12312ef3b20088dd32af75250569c616b4d563d6

  • Generic Comparator problem

    Hi!
    In our code we use Comparator, but can not make it work with generics.
    The only way is to insert cast in some places, but that destroy the point in using generics in the first place.
    Basically we have a superclass Foo and child classes FooA, FooB, FooC etc. (FooX extends Foo)
    In Foo there is a method that needs to compare two FooX objects (they are always both of the same type).
    So Foo declares an abstract method getComparator() and then calls compare() from it.
    The current code is like this :
    public abstract class Foo {
        public abstract Comparator<? extends Foo> getComparator();
        private int doAndCompare(Foo newFoo) {
            if (0 == this.getComparator().compare(this, newFoo)) {
             // some code ...
    // each FooX is like this
    public class FooA extends Foo {
        static Comparator<FooA> myComparator = new Comparator<FooA>() {
            public int compare(FooA one, FooA two) {
                // the computation is specific for each FooX
                return xxx; // compute and return some int value
        public Comparator<FooA> getComparator() {
            return  myComparator;
    }This code has a compile error in the if statement:
    The method compare(capture-of ? extends Foo, capture-of ? extends Foo) in the type Comparator<capture-of ? extends Foo> is not applicable for the arguments (Foo, Foo)
    I could use "super" instead of "extends" in the getComparator() definition, but the each FooX would have an error, which are solvable only by casting.
    Is there a cast-less solution ?

    This might not be the post that will answer your question (since I honestly do not completely get your question), but might provide some (to) creative insights.
    A weird construct that will work without casting (but probably not very useful):
    public static void main(String[] args) {
         FooX x1 = new FooX();
         FooX x2 = new FooX();
         // requires a parameter of type FooX
         x1.doAndCompare(x2);
         FooY y1 = new FooY();
         FooY y2 = new FooY();
         // requires a parameter of type FooY
         y1.doAndCompare(y2);
         Foo f1 = new FooY();
         Foo f2 = new FooY();
         f1.doAndCompare(y2); // requires a parameter of type Foo, so no actual benifit here? Will work though
         f1.doAndCompare(x2); // Will throw a ClassCastException, so not very usable
    static abstract class Foo<T extends Foo<?>> implements Comparable<T> {
         public void doAndCompare(T foo) {
              if (0 == this.compareTo(foo)) {
                   // do your magic
    static class FooX extends Foo<FooX> {
         public int compareTo(FooX o) {
              // TODO Auto-generated method stub
              return 0;
    static class FooY extends Foo<FooY> {
         public int compareTo(FooY o) {
              // TODO Auto-generated method stub
              return 0;
    }An example that works with casting and that will work:
    public static void main(String[] args) {
         FooX x1 = new FooX();
         FooX x2 = new FooX();
         // requires a parameter of type Foo, FooX.compareTo(FooX) will be invoked
         x1.doAndCompare(x2);
         FooY y1 = new FooY();
         FooY y2 = new FooY();
         // requires a parameter of type Foo, FooY.compareTo(FooY) will be invoked
         y1.doAndCompare(y2);
         // requires a parameter of type Foo
         y1.doAndCompare(x2); // will work
    static abstract class Foo implements Comparable<Foo> {
         public void doAndCompare(Foo foo) {
              if (0 == this.compareTo(foo)) {
                   // do your magic
    static class FooX extends Foo {
         public int compareTo(Foo foo) {
              if (foo instanceof FooX) {
                   return this.compareTo((FooX) foo);
              } else {
                   return 1; // return what's apropriate of not equal
         public int compareTo(FooX fooX) {
              return 0;
    static class FooY extends Foo {
         public int compareTo(Foo foo) {
              if (foo instanceof FooY) {
                   return this.compareTo((FooY) foo);
              } else {
                   return 1; // return what's apropriate of not equal
         public int compareTo(FooY fooY) {
              return 0;
    }I couldn't help noticing that in your original post you very specifically used 'if comparision == 0'. That looks a lot like Foo.equals() to me. Isn't that just what you want?

  • Adobe acrobat pdf compare problem

    I have query on Adobe Acrobat Proffesional 7 on comparing texual difference for the attached two pdf file its show text is identical.
    But in the two pdf files difference is present.
    Please kindly advise on this.
    Thanks..

    If you check teh box to check font issues, then there is a difference indicated with the text comparison. It is indicated that there is a font difference. This was the result I got with AA7 that you said you are using. The characters are apparently the same number, but one in ANSI and the other in Roman of your font style.

  • Array.sort(Object[], comparator) problems

    I have been trying for days to figure out how to sort my array of geneInfo ono the field score1.
    when i try to use Arrays.sort(gInfo, new score1Comp()) it turns all of the array null.
    class score1Comp implements Comparator
    public int compare(Object o1, Object o2)
    geneInfo g1 = (geneInfo)o1;
    geneInfo g2 = (geneInfo)o2;
    // added these checkers to get rid of nullPointerException, but checked to see that most are non null
    if(g1==null&&g2==null)
    return 0;
    if(g1==null)
    return -1;
    if(g2==null)
    return 1;
    if(g1.getScore1() == g2.getScore1())
    return 0;
    else
    double temp = g1.getScore1() - g2.getScore1();
    System.out.println("score g1 - score g2: " + temp);
    System.out.println("rounded: " + (int)Math.round(temp));
    return (int)Math.round(temp);
    public boolean equals(Object obj)
    return obj.equals (this);
    }

    You have sorting your array with null to be the least on value object. For example here:
    MyObject[] objs = new MyObject[1000];
    objs[0] = new MyObject(3);
    objs[1] = new MyObject(2);
    objs[2] = new MyObject(1);
    Arrays.sort(objs, new score1Comp());Guess what the result would be? Your array would have the first 997 elements become null and the last 3 would be sorted to (1), (2), (3).
    So the cause is how your Comparator treats the null value. The solution could be to make sure your sorting array is filled correctly, or reverse the return 1/-1 for the null treatment.
    --lichu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Comparator Problem in understanding

    hello all please find query as below :
    /* program to alter the ordering of the elements in the collection class TREESET
    class Demo1 overrides compare() of Comparator interface
    which returns the int value.
    when 'return b1.compareTo(a1);' is used then the program output is as
         o/p:- vijay sunil shyjin rupesh ishwar
    i.e., names are displayed in ascending order
    when 'return a1.compareTo(b1);' is used then the program output is as
         o/p:- ishwar rupesh shyjin sunil vijay
    i.e., names are displayed in descending order
    How these change of ordering occurs ?
    import java.util.*;
    class Demo1 implements Comparator
         public int compare(Object a,Object b)
              String a1=(String) a;
              String b1=(String) b;
              return a1.compareTo(b1);
    class DemoComparator
         public static void main(String args[])
              TreeSet t=new TreeSet(new Demo1());
              t.add("sunil");
              t.add("ishwar");
              t.add("shyjin");
              t.add("rupesh");
              t.add("vijay");
              Iterator i=t.iterator();
              while(i.hasNext())
                   Object o=i.next();
                   System.out.print(o+" ");
              System.out.println();
    }

    Per the java docs:
    public interface Comparable
    This interface imposes a total ordering on the objects of each class that implements it. This ordering is referred to as the class's natural ordering, and the class's compareTo method is referred to as its natural comparison method.
    Lists (and arrays) of objects that implement this interface can be sorted automatically by Collections.sort (and Arrays.sort). Objects that implement this interface can be used as keys in a sorted map or elements in a sorted set, without the need to specify a comparator.
    A class's natural ordering is said to be consistent with equals if and only if (e1.compareTo((Object)e2)==0) has the same boolean value as e1.equals((Object)e2) for every e1 and e2 of class C.
    It is strongly recommended (though not required) that natural orderings be consistent with equals. This is so because sorted sets (and sorted maps) without explicit comparators behave "strangely" when they are used with elements (or keys) whose natural ordering is inconsistent with equals. In particular, such a sorted set (or sorted map) violates the general contract for set (or map), which is defined in terms of the equals operation.
    For example, if one adds two keys a and b such that (a.equals((Object)b) && a.compareTo((Object)b) != 0) to a sorted set that does not use an explicit comparator, the second add operation returns false (and the size of the sorted set does not increase) because a and b are equivalent from the sorted set's perspective.
    Virtually all Java core classes that implement comparable have natural orderings that are consistent with equals. One exception is java.math.BigDecimal, whose natural ordering equates BigDecimals with equal values and different precisions (such as 4.0 and 4.00).
    For the mathematically inclined, the relation that defines the natural ordering on a given class C is:
    {(x, y) such that x.compareTo((Object)y) <= 0}.
    The quotient for this total order is:
    {(x, y) such that x.compareTo((Object)y) == 0}.
    It follows immediately from the contract for compareTo that the quotient is an equivalence relation on C, and that the natural ordering is a total order on C. When we say that a class's natural ordering is consistent with equals, we mean that the quotient for the natural ordering is the equivalence relation defined by the class's equals(Object) method:
    {(x, y) such that x.equals((Object)y)}.

Maybe you are looking for

  • IPod touch: Seen by XP, not seen on OSX.

    Strange one. 1st Gen ipod Touch with latest software(think its 3.3), latest version of itunes. Its seen and works perfect with Windows XP. I plug it into my Mac Book Pro, running Lion and its not seen. nothing happens wihen i plug it in. I have reset

  • DVD studio wont recognise PAL footage from FCP

    OK, I have shot some footage on my Canon XL1S (PAL) and done some very minimal editing in FCP Studio, again set to DV PAL, I have added no effects as it is basically a video assessment for a friends pilates class. I have then exported it from FCP usi

  • Getting error message about customer in IDOC

    the VKORG, VTWEG, SPART cannot be detemined for customer XXX... in inbound idoc, basic type ORDERS05... can you please help me on this... where should i check regarding this problem? thanks in advance, Pablito

  • IPhone & Family Plan

    Hello. I really need help here. I need to find out some information about prices. 1. How much would it be with a family plan of 1400 shared minutes with one iPhone and two normal phones along with unlitmited texting for the iPhone? How much monthly,

  • Can't find anyone to "port" my old number

    I hope someone here can help me find a VerizonFiOS representative who will actually be able to help me. After many hours on chat and many phone calls, I still have no phone service or have found any answers as how to correct my problem. Long story sh