private SimpleConstantContinuousBarrier(BarrierType barrierType, KnockType knockType, double barrierLevel) { JodaBeanUtils.notNull(barrierType, "barrierType"); JodaBeanUtils.notNull(knockType, "knockType"); this.barrierType = barrierType; this.knockType = knockType; this.barrierLevel = barrierLevel; }
public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case 1029043089: // barrierType this.barrierType = (BarrierType)newValue; break; case 975895086: // knockType this.knockType = (KnockType)newValue; break; case 1827586573: // barrierLevel this.barrierLevel = (double?)newValue.Value; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
public virtual void test_of_lookup_null() { assertThrowsIllegalArg(() => KnockType.of(null)); }
public virtual void test_of_lookup_notFound() { assertThrowsIllegalArg(() => KnockType.of("Rubbish")); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookup(KnockType type, String name) public virtual void test_of_lookup(KnockType type, string name) { assertEquals(KnockType.of(name), type); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "name") public void test_toString(KnockType type, String name) public virtual void test_toString(KnockType type, string name) { assertEquals(type.ToString(), name); }
public SimpleConstantContinuousBarrier inverseKnockType() { KnockType inverse = knockType.Equals(KnockType.KNOCK_IN) ? KnockType.KNOCK_OUT : KnockType.KNOCK_IN; return(of(barrierType, inverse, barrierLevel)); }
//------------------------------------------------------------------------- /// <summary> /// Obtains the continuous barrier with constant barrier level. /// </summary> /// <param name="barrierType"> the barrier type </param> /// <param name="knockType"> the knock type </param> /// <param name="barrierLevel"> the barrier level </param> /// <returns> the instance </returns> public static SimpleConstantContinuousBarrier of(BarrierType barrierType, KnockType knockType, double barrierLevel) { return(new SimpleConstantContinuousBarrier(barrierType, knockType, barrierLevel)); }