Skip to content

Commit

Permalink
Renamed dedup --> deduplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
tinwelint committed Jan 18, 2017
1 parent bd9b688 commit 9c89da2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
Expand Up @@ -51,7 +51,7 @@ public NodeInUseWithCorrectLabelsCheck( long[] expectedLabels, boolean checkStor
private static long[] sortAndDeduplicate( long[] labels )
{
sort( labels );
return PrimitiveLongCollections.dedup( labels );
return PrimitiveLongCollections.deduplicate( labels );
}

@Override
Expand Down
Expand Up @@ -111,7 +111,7 @@

import static java.lang.String.format;

import static org.neo4j.collection.primitive.PrimitiveIntCollections.dedup;
import static org.neo4j.collection.primitive.PrimitiveIntCollections.deduplicate;

public class OperationsFacade
implements ReadOperations, DataWriteOperations, SchemaWriteOperations, QueryRegistryOperations,
Expand Down Expand Up @@ -369,7 +369,7 @@ public RelationshipIterator nodeGetRelationships( long nodeId, Direction directi
try ( Cursor<NodeItem> node = dataRead().nodeCursorById( statement, nodeId ) )
{
return new CursorRelationshipIterator(
node.get().relationships( direction( direction ), dedup( relTypes ) ) );
node.get().relationships( direction( direction ), deduplicate( relTypes ) ) );
}
}

Expand Down
Expand Up @@ -254,7 +254,7 @@ public boolean test( int item )
};
}

public static PrimitiveIntIterator dedup( PrimitiveIntIterator source )
public static PrimitiveIntIterator deduplicate( PrimitiveIntIterator source )
{
return new PrimitiveIntFilteringIterator( source )
{
Expand Down Expand Up @@ -834,7 +834,7 @@ private static <T, C extends Collection<T>> void addUnique( C collection, T item
* @param values sorted array of int values.
* @return the provided array if no duplicates were found, otherwise a new shorter array w/o duplicates.
*/
public static int[] dedup( int[] values )
public static int[] deduplicate( int[] values )
{
int unique = 0;
for ( int i = 0; i < values.length; i++ )
Expand Down
Expand Up @@ -263,7 +263,7 @@ public boolean test( long item )
};
}

public static PrimitiveLongIterator dedup( PrimitiveLongIterator source )
public static PrimitiveLongIterator deduplicate( PrimitiveLongIterator source )
{
return new PrimitiveLongFilteringIterator( source )
{
Expand Down Expand Up @@ -887,7 +887,7 @@ private static <T, C extends Collection<T>> void addUnique( C collection, T item
* @param values sorted array of long values.
* @return the provided array if no duplicates were found, otherwise a new shorter array w/o duplicates.
*/
public static long[] dedup( long[] values )
public static long[] deduplicate( long[] values )
{
int unique = 0;
for ( int i = 0; i < values.length; i++ )
Expand Down
Expand Up @@ -119,13 +119,13 @@ public void filter() throws Exception
}

@Test
public void dedup() throws Exception
public void deduplicate() throws Exception
{
// GIVEN
PrimitiveIntIterator items = PrimitiveIntCollections.iterator( 1, 1, 2, 3, 2 );

// WHEN
PrimitiveIntIterator deduped = PrimitiveIntCollections.dedup( items );
PrimitiveIntIterator deduped = PrimitiveIntCollections.deduplicate( items );

// THEN
assertItems( deduped, 1, 2, 3 );
Expand Down Expand Up @@ -530,13 +530,13 @@ public void asArray() throws Exception
}

@Test
public void shouldDedup() throws Exception
public void shouldDeduplicate() throws Exception
{
// GIVEN
int[] array = new int[] {1, 1, 2, 5, 6, 6};

// WHEN
int[] deduped = PrimitiveIntCollections.dedup( array );
int[] deduped = PrimitiveIntCollections.deduplicate( array );

// THEN
assertArrayEquals( new int[] {1, 2, 5, 6}, deduped );
Expand Down
Expand Up @@ -119,13 +119,13 @@ public void filter() throws Exception
}

@Test
public void dedup() throws Exception
public void deduplicate() throws Exception
{
// GIVEN
PrimitiveLongIterator items = PrimitiveLongCollections.iterator( 1, 1, 2, 3, 2 );

// WHEN
PrimitiveLongIterator deduped = PrimitiveLongCollections.dedup( items );
PrimitiveLongIterator deduped = PrimitiveLongCollections.deduplicate( items );

// THEN
assertItems( deduped, 1, 2, 3 );
Expand Down Expand Up @@ -579,13 +579,13 @@ public void asArray() throws Exception
}

@Test
public void shouldDedup() throws Exception
public void shouldDeduplicate() throws Exception
{
// GIVEN
long[] array = new long[] {1L, 1L, 2L, 5L, 6L, 6L};

// WHEN
long[] deduped = PrimitiveLongCollections.dedup( array );
long[] deduped = PrimitiveLongCollections.deduplicate( array );

// THEN
assertArrayEquals( new long[] {1L, 2L, 5L, 6L}, deduped );
Expand Down

0 comments on commit 9c89da2

Please sign in to comment.