@Test public void testSelectMimeMultipart() throws Exception { MimeMultipart mmp = createMultipart(); SelectByPosition selector = new SelectByPosition(); List<MimeBodyPart> parts = selector.select(mmp); assertEquals(1, parts.size()); selector = new SelectByPosition(15); parts = selector.select(mmp); assertEquals(0, parts.size()); }
@Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); }
SelectByPosition implements PartSelector { @Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); } }
SelectByPosition implements PartSelector { @Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); } SelectByPosition();  SelectByPosition(int i); }
SelectByPosition implements PartSelector { @Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); } SelectByPosition();  SelectByPosition(int i); @Override MimeBodyPart select(BodyPartIterator m); @Override List<MimeBodyPart> select(MimeMultipart in); int getPosition(); void setPosition(int i); }
SelectByPosition implements PartSelector { @Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); } SelectByPosition();  SelectByPosition(int i); @Override MimeBodyPart select(BodyPartIterator m); @Override List<MimeBodyPart> select(MimeMultipart in); int getPosition(); void setPosition(int i);  }