Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Use fancy method references.
Browse files Browse the repository at this point in the history
  • Loading branch information
calvertdw committed Feb 20, 2018
1 parent 73cc6d0 commit 3266635
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/us/ihmc/idl/IDLSequence.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
* The current implementation of this class extends ArrayList<T>. Primitive versions are provided as subclasses and extend Trove ArrayLists.
* By providing a custom interface to ArrayList we can adjust the type to more efficient storage should the need arise.
*
* @param T Type of data
*
* @author Jesper Smith
*/
public interface IDLSequence
Expand Down Expand Up @@ -610,7 +608,7 @@ public static class StringBuilderHolder extends PreallocatedList<StringBuilder>

public StringBuilderHolder(int maxSize, String typeCode)
{
super(StringBuilder.class, () -> new StringBuilder(), maxSize);
super(StringBuilder.class, StringBuilder::new, maxSize);
switch (typeCode)
{
case "type_d":
Expand Down Expand Up @@ -775,7 +773,7 @@ public static class Object<T> extends PreallocatedList<T> implements IDLSequence
*/
public Object(int maxSize, Class<T> clazz, TopicDataType<T> topicDataType)
{
super(clazz, () -> topicDataType.createData() , maxSize);
super(clazz, topicDataType::createData, maxSize);
this.topicDataType = topicDataType;

}
Expand Down

0 comments on commit 3266635

Please sign in to comment.