//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unchecked") @Override public Builder set(String propertyName, Object newValue) public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case 3355: // id this.id_Renamed = (StandardId)newValue; break; case 1766940245: // portfolioItemType this.portfolioItemType_Renamed = (PortfolioItemType)newValue; break; case -1491615543: // productType this.productType_Renamed = (ProductType)newValue; break; case -1089470353: // currencies this.currencies_Renamed = (ISet <Currency>)newValue; break; case -1724546052: // description this.description_Renamed = (string)newValue; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> internal Builder(PortfolioItemSummary beanToCopy) { this.id_Renamed = beanToCopy.id; this.portfolioItemType_Renamed = beanToCopy.PortfolioItemType; this.productType_Renamed = beanToCopy.ProductType; this.currencies_Renamed = beanToCopy.Currencies; this.description_Renamed = beanToCopy.Description; }
private PortfolioItemSummary(StandardId id, PortfolioItemType portfolioItemType, ProductType productType, ISet <Currency> currencies, string description) { JodaBeanUtils.notNull(portfolioItemType, "portfolioItemType"); JodaBeanUtils.notNull(productType, "productType"); JodaBeanUtils.notNull(currencies, "currencies"); JodaBeanUtils.notBlank(description, "description"); this.id = id; this.portfolioItemType = portfolioItemType; this.productType = productType; this.currencies = ImmutableSet.copyOf(currencies); this.description = description; }
/// <summary> /// Obtains an instance. </summary> /// <param name="id"> the value of the property </param> /// <param name="portfolioItemType"> the value of the property, not null </param> /// <param name="productType"> the value of the property, not null </param> /// <param name="currencies"> the value of the property, not null </param> /// <param name="description"> the value of the property, not blank </param> /// <returns> the instance </returns> public static PortfolioItemSummary of(StandardId id, PortfolioItemType portfolioItemType, ProductType productType, ISet <Currency> currencies, string description) { return(new PortfolioItemSummary(id, portfolioItemType, productType, currencies, description)); }
/// <summary> /// Sets the type of the item. </summary> /// <param name="portfolioItemType"> the new value, not null </param> /// <returns> this, for chaining, not null </returns> public Builder portfolioItemType(PortfolioItemType portfolioItemType) { JodaBeanUtils.notNull(portfolioItemType, "portfolioItemType"); this.portfolioItemType_Renamed = portfolioItemType; return(this); }
//------------------------------------------------------------------------- public virtual void test_of() { assertEquals(PortfolioItemType.of("Position"), PortfolioItemType.POSITION); assertEquals(PortfolioItemType.of("position"), PortfolioItemType.POSITION); assertEquals(PortfolioItemType.of("POSITION"), PortfolioItemType.POSITION); }