comparison commons/pyRepetUnit/align/AlignList.py @ 31:0ab839023fe4

Uploaded
author m-zytnicki
date Tue, 30 Apr 2013 14:33:21 -0400
parents 94ab73e8a190
children
comparison
equal deleted inserted replaced
30:5677346472b5 31:0ab839023fe4
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)