1 package fr.orsay.lri.varna.models.rna;
3 import java.util.ArrayList;
5 public class ModeleStrand {
7 private ArrayList<ModeleBase> _strand = new ArrayList<ModeleBase>();
8 private boolean hasBeenPlaced = false;
9 private boolean strandLeft = false;
10 private boolean strandRight = false;
11 private int levelPosition;
13 public ModeleStrand(){
17 public void addBase(ModeleBase mb){
21 public void addBase(int index, ModeleBase mb){
22 this._strand.add(index, mb);
25 public int sizeStrand() {
26 return this._strand.size();
29 public ModeleBase getMB(int a) {
30 return this._strand.get(a);
33 public ArrayList<ModeleBase> getArrayListMB() {
37 public int getLevelPosition(){
38 return this.levelPosition;
41 public void setLevelPosition(int a){
45 public boolean getStrandRight(){
46 return this.strandRight;
49 public void setStrandRight(boolean bool){
50 this.strandRight=bool;
53 public boolean getStrandLeft(){
54 return this.strandLeft;
57 public void setStrandLeft(boolean bool){
61 public boolean hasBeenPlaced(){
62 return this.hasBeenPlaced;
65 public void setHasBeenPlaced(boolean bool){
66 this.hasBeenPlaced =bool;
69 public boolean existInStrand(int a){
70 int size =sizeStrand();
72 for (int i=0; i<size;i++){
73 if(a==this.getMB(i).getIndex()){