//------------------------------------------------------------------------- /// <summary> /// Converts this pair to an object-based {@code Pair}. /// </summary> /// <returns> the object-based pair </returns> public Pair <double, double> toPair() { return(Pair.of(first, second)); }
/// <summary> /// Obtains an instance from a {@code Pair}. /// </summary> /// <param name="pair"> the pair to convert </param> /// <returns> a pair formed by extracting values from the pair </returns> public static DoublesPair ofPair(Pair <double, double> pair) { ArgChecker.notNull(pair, "pair"); return(new DoublesPair(pair.First, pair.Second)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "factory") public void test_toPair(long first, double second) public virtual void test_toPair(long first, double second) { LongDoublePair test = LongDoublePair.of(first, second); assertEquals(test.toPair(), Pair.of(first, second)); }