Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.man.bioinf.sequence.geom
Class SequenceAlignmentPoint

    java.lang.Object
      |
      +--uk.ac.man.bioinf.sequence.geom.SequenceAlignmentPoint

All Implemented Interfaces:
  Cloneable, Comparable

public class SequenceAlignmentPoint
extends Object
implements Cloneable, Comparable

SequenceAlignmentPoint.java Represents a point in an alignment, where X is the position in a sequence, and Y is the index of the sequence in the alignment. No checking is currently written into this object for the validity of the point, and the opportunity to use listeners is not seized (although this can easily be added later). Created: Mon Mar 27 11:16:19 2000

Version:
  $Id: SequenceAlignmentPoint.java,v 1.9 2001/04/11 17:04:43 lord Exp $
Author:
  J Selley

Constructor Summary
`SequenceAlignmentPoint()`
`SequenceAlignmentPoint(int x, int y)`
`SequenceAlignmentPoint(SequenceAlignmentPoint point)`

Method Summary
`Object` | `clone()`
`int` | `compareTo(Object obj)` Compares this point to another.
`boolean` | `equals(Object obj)` Ascertains the equality of a given point to this object.
`SequenceAlignmentPoint` | `getLocation()` Returns the location in the sequence alignment, represented by this object.
`int` | `getX()` Returns the X index of the point.
`int` | `getY()` Returns the Y index of the point.
`SequenceAlignmentPoint` | `move(int x, int y)` Allows the moving of a point to a new position.
`SequenceAlignmentPoint` | `setLocation(int x, int y)` Sets the location of the point.
`SequenceAlignmentPoint` | `setLocation(SequenceAlignmentPoint point)` Sets the location of the point.
`SequenceAlignmentPoint` | `setX(int x)`
`SequenceAlignmentPoint` | `setY(int y)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SequenceAlignmentPoint

    public SequenceAlignmentPoint()

### SequenceAlignmentPoint

    public SequenceAlignmentPoint(int x,
                                  int y)

### SequenceAlignmentPoint

    public SequenceAlignmentPoint(SequenceAlignmentPoint point)

Method Detail

### equals

    public boolean equals(Object obj)

  Ascertains the equality of a given point to this object. Overrides the method in Object.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `obj` - the point
  Returns:
    the equality of the objects

### compareTo

    public int compareTo(Object obj)

  Compares this point to another. Points are compared by comparing first the value of getX(), and then getY(). If obj is not a SequenceAlignmentPoint an exception is thrown.

  Specified by:
    `compareTo` in interface `Comparable`

### setX

    public SequenceAlignmentPoint setX(int x)

### setY

    public SequenceAlignmentPoint setY(int y)

### setLocation

    public SequenceAlignmentPoint setLocation(int x,
                                              int y)

  Sets the location of the point. This method can be further expanded if listeners are appropriate, and to include error checking.

  Parameters:
    `x` - the x position of the point
    `y` - the y position of the point

### setLocation

    public SequenceAlignmentPoint setLocation(SequenceAlignmentPoint point)

  Sets the location of the point. This method will allow a point to be duplicated. Calls setLocation(int, int) to save on correction procedures.

  Parameters:
    `point` - the point in a sequence alignment

### move

    public SequenceAlignmentPoint move(int x,
                                       int y)

  Allows the moving of a point to a new position.

  Parameters:
    `x` - the X index
    `y` - the Y index

### getLocation

    public SequenceAlignmentPoint getLocation()

  Returns the location in the sequence alignment, represented by this object.

  Returns:
    the location represented by this point

### getX

    public int getX()

  Returns the X index of the point.

  Returns:
    the X index

### getY

    public int getY()

  Returns the Y index of the point.

  Returns:
    the Y index

### clone

    public Object clone()
                 throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
    `CloneNotSupportedException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD