Skip to content
Permalink
Browse files

Create Position.java

  • Loading branch information
sus11005 committed Sep 28, 2016
1 parent 66d6887 commit 8156e81312e6fd366512c977dede89c721efba7b
Showing with 34 additions and 0 deletions.
  1. +34 −0 COMPRESSION/Position.java
@@ -0,0 +1,34 @@
public class Position implements Comparable{

private Contig contig;
private int startingPosition;

public Contig getContig() {
return contig;
}

public void setContig(Contig contig) {
this.contig = contig;
}

public int getStartingPosition() {
return startingPosition;
}

public void setStartingPosition(int startingPosition) {
this.startingPosition = startingPosition;
}

public int compareTo(Object obj) {
Position tmp = (Position) obj;
if ((this.startingPosition) < (tmp.startingPosition)) {
/* instance lt received */
return -1;
} else if ((this.startingPosition) > (tmp.startingPosition)) {
/* instance gt received */
return 1;
}
/* instance == received */
return 0;
}
}

0 comments on commit 8156e81

Please sign in to comment.
You can’t perform that action at this time.