DefaultAlignment.java :  » Search » isplice-undergrad-research » Model » alignments » Java Open Source

Java Open Source » Search » isplice undergrad research 
isplice undergrad research » Model » alignments » DefaultAlignment.java
package Model.alignments;

import java.awt.Graphics;

import Model.Subset;

public class DefaultAlignment implements Alignment {
  private Subset parent;
  private int start;
  private int count;

  public DefaultAlignment(int start, int count, Subset parent) {
    this.start = start;
    this.count = count;
    this.parent = parent;
  }

  @Override
  public void setParent(Subset parent) {
    this.parent = parent;
  }

  @Override
  public Subset getParent() {
    return parent;
  }

  @Override
  public void setCount(int count) {
    this.count = count;
  }

  @Override
  public int getCount() {
    return count;
  }

  @Override
  public void setStart(int start) {
    this.start = start;
  }

  @Override
  public int getStart() {
    return start;
  }

  @Override
  public void draw(Graphics graphic, int x, int y) {
    // TODO Auto-generated method stub

  }

  @Override
  public boolean equals(Alignment alignment) {
    return (alignment instanceof DefaultAlignment)
        && (this.getStart() == alignment.getStart());
  }

  @Override
  public int compareTo(Alignment alignment) {
    return this.start - alignment.getStart();
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.