<s> from MailItem import MailItem <EOL> class MailItems : <EOL> NUM_ITEMS = <NUM_LIT> <EOL> FRAGMENTS_PER_EMAIL = <NUM_LIT:10> <EOL> senders = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> emails = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> subjects = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> fragments = [ "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , <EOL> "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" ] <EOL> def __init__ ( self ) : <EOL> self . senderIdx = <NUM_LIT:0> <EOL> self . emailIdx = <NUM_LIT:0> <EOL> self . subjectIdx = <NUM_LIT:0> <EOL> self . fragmentIdx = <NUM_LIT:0> <EOL> self . items = [ ] <EOL> i = <NUM_LIT:0> <EOL> while ( i < MailItems . NUM_ITEMS ) : <EOL> self . items . append ( self . createFakeMail ( ) ) <EOL> i = i + <NUM_LIT:1> <EOL> def getMailItemCount ( self ) : <EOL> return len ( self . items ) <EOL> def getMailItem ( self , index ) : <EOL> if ( index >= len ( self . items ) ) : <EOL> return None <EOL> return self . items [ index ] <EOL> def createFakeMail ( self ) : <EOL> sender = MailItems . senders [ self . senderIdx ] <EOL> self . senderIdx = self . senderIdx + <NUM_LIT:1> <EOL> if ( self . senderIdx == len ( MailItems . senders ) ) : <EOL> self . senderIdx = <NUM_LIT:0> ; <EOL> email = MailItems . emails [ self . emailIdx ] <EOL> self . emailIdx = self . emailIdx + <NUM_LIT:1> <EOL> if ( self . emailIdx == len ( MailItems . emails ) ) : <EOL> self . emailIdx = <NUM_LIT:0> <EOL> subject = MailItems . subjects [ self . subjectIdx ] <EOL> self . subjectIdx = self . subjectIdx + <NUM_LIT:1> <EOL> if ( self . subjectIdx == len ( MailItems . subjects ) ) : <EOL> self . subjectIdx = <NUM_LIT:0> <EOL> body = "<STR_LIT>" <EOL> i = <NUM_LIT:0> <EOL> while ( i < MailItems . FRAGMENTS_PER_EMAIL ) : <EOL> body = body + MailItems . fragments [ self . fragmentIdx ] <EOL> self . fragmentIdx = self . fragmentIdx + <NUM_LIT:1> <EOL> if ( self . fragmentIdx == len ( MailItems . fragments ) ) : <EOL> self . fragmentIdx = <NUM_LIT:0> <EOL> i = i + <NUM_LIT:1> <EOL> return MailItem ( sender , email , subject , body ) </s>
