Exemplo n.º 1
0
 private void VerifyResult(LongSet results)
 {
     assertEquals(3, results.size());
     assertTrue(results.contains(1));
     assertTrue(results.contains(2));
     assertTrue(results.contains(3));
 }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void marshalIndexIds(org.neo4j.storageengine.api.WritableChannel buffer, org.eclipse.collections.api.set.primitive.LongSet indexIds) throws java.io.IOException
            internal virtual void MarshalIndexIds(WritableChannel buffer, LongSet indexIds)
            {
                buffer.PutInt(indexIds.size());
                LongIterator itr = indexIds.longIterator();

                while (itr.hasNext())
                {
                    long indexId = itr.next();
                    buffer.PutLong(indexId);
                }
            }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void convertJavaCollectionToSetOfPrimitives()
        internal virtual void ConvertJavaCollectionToSetOfPrimitives()
        {
            IList <long> longs = new IList <long> {
                1L, 4L, 7L
            };
            LongSet longSet = PrimitiveLongCollections.AsSet(longs);

            assertTrue(longSet.contains(1L));
            assertTrue(longSet.contains(4L));
            assertTrue(longSet.contains(7L));
            assertEquals(3, longSet.size());
        }
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (!(obj is LongSet))
            {
                return(false);
            }
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.eclipse.collections.api.set.primitive.LongSet other = (org.eclipse.collections.api.set.primitive.LongSet) obj;
            LongSet other = ( LongSet )obj;

            return(Size() == other.size() && containsAll(other));
        }
Exemplo n.º 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldHandleEmptyDescriptors()
        public virtual void ShouldHandleEmptyDescriptors()
        {
            LongSet indexIds = _prepareStoreCopyFiles.NonAtomicIndexIds;

            assertEquals(0, indexIds.size());
        }