001    package cnslab.cnsnetwork;
002
003    /***********************************************************************
004    * 2-D points.
005    * 
006    * Deprecated because of changes made to class stimulus.
007    * 
008    * @author
009    *   Yi Dong
010    * @author
011    *   David Wallace Croft, M.Sc.
012    * @author
013    *   Jeremy Cohen
014    ***********************************************************************/
015    @Deprecated
016    public final class  Points
017      implements Comparable<Points>
018    ////////////////////////////////////////////////////////////////////////
019    ////////////////////////////////////////////////////////////////////////
020    {
021      
022    public double  x, y;
023
024    ////////////////////////////////////////////////////////////////////////
025    ////////////////////////////////////////////////////////////////////////
026
027    public  Points (
028      final double  x,
029      final double  y )
030    ////////////////////////////////////////////////////////////////////////
031    {
032      this.x = x;
033      
034      this.y = y;
035    }
036
037    ////////////////////////////////////////////////////////////////////////
038    ////////////////////////////////////////////////////////////////////////
039    
040    @Override
041    public int  compareTo ( Points  other )
042    ////////////////////////////////////////////////////////////////////////
043    {
044      if ( x == other.x ) 
045      {
046        if ( y < other.y )
047        {
048          return -1;
049        }
050        else if ( y > other.y )
051        {
052          return 1;
053        }
054        else
055        {
056          return 0;
057        }
058      }
059      else if ( x < other.x )
060      {
061        return -1;
062      }
063      else
064      {
065        return 1;
066      }
067    }
068      
069    ////////////////////////////////////////////////////////////////////////
070    ////////////////////////////////////////////////////////////////////////
071    }