Package com.opengamma.financial.security.swap

Examples of com.opengamma.financial.security.swap.CommodityNotional$Meta


  public static Notional createNotional(final NotionalBean bean) {
    return bean.getNotionalType().accept(new NotionalVisitor<Notional>() {

      @Override
      public Notional visitCommodityNotional(final CommodityNotional ignore) {
        return new CommodityNotional();
      }

      @Override
      public Notional visitInterestRateNotional(InterestRateNotional ignore) {
        return new InterestRateNotional(currencyBeanToCurrency(bean.getCurrency()), bean.getAmount());
View Full Code Here


    public Notional convertFromString(Class<? extends Notional> cls, String str) {     
      if (cls.isAssignableFrom(InterestRateNotional.class)) {
        String[] s = str.split(" ", 2);       
        return new InterestRateNotional(Currency.of(s[0].trim()), Double.parseDouble(s[1].trim()));
      } else if (cls.isAssignableFrom(CommodityNotional.class)) {
        return new CommodityNotional();
      } else if (cls.isAssignableFrom(SecurityNotional.class)) {
        return new SecurityNotional(UniqueId.parse(str));
      } else if (cls.isAssignableFrom(VarianceSwapNotional.class)) {
        String[] s = str.split(" ", 2);
        return new VarianceSwapNotional(Currency.of(s[0].trim()), Double.parseDouble(s[1].trim()));
View Full Code Here

TOP

Related Classes of com.opengamma.financial.security.swap.CommodityNotional$Meta

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.