AnnuityDefinition implements InstrumentDefinitionWithData<Annuity<? extends Payment>, DoubleTimeSeries<ZonedDateTime>> { @Deprecated public boolean isPayer() { return _isPayer; } AnnuityDefinition(final P[] payments, final Calendar calendar); P[] getPayments(); P getNthPayment(final int n); Currency getCurrency(); @Deprecated boolean isPayer(); int getNumberOfPayments(); Calendar getCalendar(); AnnuityDefinition<?> trimBefore(final ZonedDateTime trimDate); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override Annuity<? extends Payment> toDerivative(final ZonedDateTime date); @SuppressWarnings("unchecked") @Override Annuity<? extends Payment> toDerivative(final ZonedDateTime date, final DoubleTimeSeries<ZonedDateTime> indexFixingTS); @Override V accept(final InstrumentDefinitionVisitor<U, V> visitor, final U data); @Override V accept(final InstrumentDefinitionVisitor<?, V> visitor);  }
@Test public void testPayer() { assertFalse(FIXED_DEFINITION.isPayer()); PaymentFixedDefinition[] payments = new PaymentFixedDefinition[FIXED_PAYMENTS.length]; for (int i = 0; i < FIXED_PAYMENTS.length; i++) { payments[i] = new PaymentFixedDefinition(CCY, DateUtils.getUTCDate(2011, 1, 1), -1000); } assertTrue(new AnnuityDefinition<>(payments, CALENDAR).isPayer()); payments = Arrays.copyOf(FIXED_PAYMENTS, FIXED_PAYMENTS.length); payments[0] = new PaymentFixedDefinition(CCY, DateUtils.getUTCDate(2011, 1, 1), 0); assertFalse(FIXED_DEFINITION.isPayer()); }