Skip to content

Commit

Permalink
Closes #914: Synchronized primitive lists adds override for shuffleTh…
Browse files Browse the repository at this point in the history
…is(Random rnd)

Signed-off-by: vmzakharov <zakharov.vladimir.m@gmail.com>
  • Loading branch information
vmzakharov committed Jun 15, 2020
1 parent 864bb88 commit d82abf4
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ body(type, name) ::= <<
package org.eclipse.collections.impl.list.mutable.primitive;

import java.util.Collection;
<if(!primitive.booleanPrimitive)>import java.util.Comparator;<endif>
<if(!primitive.booleanPrimitive)>
import java.util.Comparator;
import java.util.Random;
<endif>

import org.eclipse.collections.api.<name>Iterable;
import org.eclipse.collections.api.Lazy<name>Iterable;
Expand Down Expand Up @@ -489,6 +492,16 @@ public Mutable<name>List shuffleThis()
return this;
}

@Override
public Mutable<name>List shuffleThis(Random rnd)
{
synchronized (this.getLock())
{
this.getMutable<name>List().shuffleThis(rnd);
}
return this;
}

@Override
public int binarySearch(<type> value)
{
Expand Down

0 comments on commit d82abf4

Please sign in to comment.