public override MutableSet <V> Collect <V, T1>(LongToObjectFunction <T1> function) where T1 : V { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.eclipse.collections.api.set.MutableSet<V> result = new org.eclipse.collections.impl.set.mutable.UnifiedSet<>(size()); MutableSet <V> result = new UnifiedSet <V>(Size()); Each(element => { result.add(function.apply(element)); }); return(result); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void getIfAbsentPutWithKey() internal virtual void getIfAbsentPutWithKey() { //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("Convert2Lambda") final org.eclipse.collections.api.block.function.primitive.LongToObjectFunction<org.neo4j.values.storable.Value> function = spy(new org.eclipse.collections.api.block.function.primitive.LongToObjectFunction<org.neo4j.values.storable.Value>() //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': LongToObjectFunction <Value> function = spy(new LongToObjectFunctionAnonymousInnerClass(this)); assertEquals(intValue(10), _map.getIfAbsentPutWithKey(0, function)); assertEquals(intValue(10), _map.getIfAbsentPutWithKey(0, function)); assertEquals(intValue(11), _map.getIfAbsentPutWithKey(1, function)); assertEquals(intValue(11), _map.getIfAbsentPutWithKey(1, function)); assertEquals(intValue(12), _map.getIfAbsentPutWithKey(2, function)); assertEquals(intValue(12), _map.getIfAbsentPutWithKey(2, function)); verify(function).valueOf(eq(0L)); verify(function).valueOf(eq(1L)); verify(function).valueOf(eq(2L)); verifyNoMoreInteractions(function); }
public override MutableBag <V> Collect <V, T1>(LongToObjectFunction <T1> function) where T1 : V { throw new System.NotSupportedException("not implemented"); }