Mercurial > repos > yufei-luo > s_mart
comparison commons/pyRepetUnit/align/AlignList.py @ 18:94ab73e8a190
Uploaded
author | m-zytnicki |
---|---|
date | Mon, 29 Apr 2013 03:20:15 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
17:b0e8584489e6 | 18:94ab73e8a190 |
---|---|
1 ## class of list of align object | |
2 # | |
3 class AlignList: | |
4 | |
5 list; | |
6 | |
7 def __init__( self ): | |
8 self.list = [] | |
9 | |
10 ## append align instance in the align instance list | |
11 # | |
12 # @param AlignInstance instance of align object | |
13 # | |
14 def append(self, AlignInstance): | |
15 self.list.append(AlignInstance) | |
16 | |
17 ## get length of list of align instance | |
18 # | |
19 #@return length integer length of list | |
20 # | |
21 def len(self): | |
22 return len(self.list) | |
23 | |
24 ## get list of align instance | |
25 # | |
26 #@return list of align instance | |
27 # | |
28 def getList(self): | |
29 return self.list | |
30 | |
31 ## get item in list of align instance according to index | |
32 # | |
33 #@param index integer index of list | |
34 #@return align instance item of list of align instance | |
35 # | |
36 def get(self, index): | |
37 return self.list[index] | |
38 | |
39 ## extend align instance in the align instance list | |
40 # | |
41 # @param AlignInstance instance of align object | |
42 # | |
43 def extend(self, AlignInstance): | |
44 self.list.extend(AlignInstance) | |
45 | |
46 ## take off an align instance from the align instance list | |
47 # | |
48 # @param AlignInstance instance of align object | |
49 # | |
50 def remove(self, AlignInstance): | |
51 self.list.remove(AlignInstance) |