Package bgu.bio.ds.rna

Source Code of bgu.bio.ds.rna.InnerStructure

package bgu.bio.ds.rna;

import gnu.trove.list.array.TCharArrayList;

public class InnerStructure {
  private TCharArrayList sequenceLeft;
  private TCharArrayList sequenceRight;

  public InnerStructure() {
    // create the lists
    this.sequenceLeft = new TCharArrayList();
    this.sequenceRight = new TCharArrayList();
  }

  public TCharArrayList getSequenceLeft() {
    return sequenceLeft;
  }

  public TCharArrayList getSequenceRight() {
    return sequenceRight;
  }

  public void reset() {
    this.sequenceLeft.resetQuick();
    this.sequenceRight.resetQuick();
  }

  public void appeandLeft(char c) {
    this.sequenceLeft.add(c);
  }

  public void appeandRight(char c) {
    this.sequenceRight.add(c);
  }

  @Override
  public String toString() {
    return this.sequenceLeft + ":" + this.sequenceRight;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    InnerStructure other = (InnerStructure) obj;
    if (sequenceLeft == null) {
      if (other.sequenceLeft != null)
        return false;
    } else if (!sequenceLeft.equals(other.sequenceLeft))
      return false;
    if (sequenceRight == null) {
      if (other.sequenceRight != null)
        return false;
    } else if (!sequenceRight.equals(other.sequenceRight))
      return false;
    return true;
  }

}
TOP

Related Classes of bgu.bio.ds.rna.InnerStructure

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.