71 ∗ **Do an e x a c t copy o f inpu t i n t o <i>t h i s </ i >.**
72 ∗ 73 ∗/
74 B duplicate ( B input ) ; **// make t h i s a d u p l i c a t e o f inpu t**
75 76 /∗∗ 77 ∗ C r e a t e and r e t u r n an i n s t a n c e o f <i>t h i s </ i> ( i . e . work l i k e **a <b>new</b> on**
78 ∗ **th e C l a s s o f <i>t h i s </ i >) .**
79 ∗ N .B . { @ l ink B a s i c B e l i e f A s s i g nm e n t\#i n s t a n c e ( ) } cannot be **d e f i n e d f o r g e n e r i c** 80 ∗ c l a s s e s but <u> i s n e c e s s a r y </u> f o r some methods . <u>I t has **t o be d e f i n e d w ith**
81 ∗ th e non g e n e r i c ( t y p i c a l l y f i n a l ) sub−**c l a s s e s </u>.**
82 ∗ **<br><br>**
83 ∗ For a g i v e n non g e n e r i c sub−**c l a s s <i>myNonGener icSubc lass </ i >, a t y p i c a l** 84 ∗ d e f i n i t i o n o f { @ l ink B a s i c B e l i e f A s s i g nm e n t\#i n s t a n c e ( ) } **i s a s f o l l o w s :**
85 ∗ **<br><br>**
86 ∗ **<f o n t c o l o r ="\#004488">< code>**
87 ∗ **{@code @Overr ide }** 88 ∗ **<br>**
89 ∗ **p u b l i c myNonGen e r i cSubc lass i n s t a n c e ( ) { r e t u r n new myNonGen e r i cSubc lass ( ) ; }**
90 ∗ **</code></f on t>** 91 ∗
92 ∗/
93 B instance **( ) ;**
94 95 /∗∗
96 ∗ **C r e a t e a c l o n e o f <i>t h i s </ i >.**
97 ∗ 98 ∗/
99 B clone **( ) ;**
100 101 /∗∗
102 ∗ **Make a mix o f th e b a s i c b e l i e f a s s i gnm e n t s s t o r e d w i t h i n th e en t r y , <i>bbaIn</ i** ←֓
>
103 ∗ **a c c o r d i n g t o t h e i r r e s p e c t i v e w e i gh t <i>we ight </ i >. Th is mix i s s t o r e d i n t o <i>**←֓
t h i s </ i >.

104 ∗
105 ∗/
106 B mix ( ArrayList <B> bbaIn , d oub l e [ ] weight ) ;
107 108 /∗∗
109 ∗ C a l l e d ea ch t im e a chang e i s done t o <i>t h i s </ i >. Th is i s u s e f **u l l f o r p r o c e s s e s** ←֓
wh ich need an 110 ∗ i n i t i a l i z a t i o n a f t e r ea ch chang e o f th e a s s i gnm e n t s . T y p i c **a l l y , th e**
111 ∗ s am p l in g methods r e q u i r e an a c t i o n o f { @ l ink B a s i c B e l i e f A s **s i g nm e n t\#**←֓
u p d a t e _ n o t i f i c a t i o n ( ) }
112 ∗ i n o r d e r t o d e c i d e f o r a new computat ion o f th e s am p l in g t a b l e **s , wh ich a r e made**
113 ∗ **n e c e s s a r y by a chang e o f th e a s s i gnm e n t s .**
114 ∗ 115 ∗/
116 **v o id** update_notification **( ) ;** //
117 118 /∗∗ 119 ∗ Return a r e p r e s e n t a t i o n o f th e s t a t e o f <i>t h i s </ i> p r i n t e d a s 120 ∗ **a S t r i n g . T y p i c a l l y , t h i s s t a t e i s th e l i s t o f a l l s t o r e d a s s ignm e n t s (**←֓
p r o p o s i t i o n 121 ∗ **and v a l u e ) . Depend ing on th e param e t e r <i>c h o i x</ i> i n e n t ry , th e** ←֓
r e p r e s e n t a t i o n 122 ∗ **i s m o d i f i e d a s f o l l l o w s :<br><br>**
123 ∗ <i>c h o i x==0</i> −− **Noth ing i s p r i n t e d .** 124 ∗ **<br>**
125 ∗< i>c h o i x==1</i> −− **Ass ignm ents a r e p r i n t e d i n i n c r e a s i n g o r d e r o f t h e i r**
126 ∗ **p r o p o s i t i o n s ,** 127 ∗ **<br>**
128 ∗< i>c h o i x==2</i> −− **Ass ignm ents a r e p r i n t e d i n d e c r e a s i n g o r d e r o f t h e i r** 129 ∗ **v a lu e ,**
130 ∗ **<br>** 131 ∗< i>c h o i x==3</i> −− **Do both p r i n t i n th a t o r d e r .**
132 ∗ **<br>**
133 ∗ 134 ∗/
135 String state ( **i n t** choix ) ; **// a s t r i n g r e p r e s e n t i n g th e s t a t e o f th e BBA**
136 137 /∗∗ 138 ∗ Remove a l l a s s i gnm e n t s from <i>t h i s </ i >. The c l a s s i n s t a n c **e i s c l e a r e d .**