java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_collection.ListSized
All Implemented Interfaces:
java.util.function.LongFunction<java.util.List<java.lang.Object>>

public class ListSized
extends java.lang.Object
implements java.util.function.LongFunction<java.util.List<java.lang.Object>>
Create a List from a long input based on a set of provided functions. As a 'Sized' function, the first argument is a function which determines the size of the resulting list. Additional functions provided are used to generate the elements to add to the collection. If the size is larger than the number of provided functions, the last provided function is used repeatedly as needed. As neither a 'Stepped' nor a 'Hashed' function, the input value used by each element function is the same as that provided to the outer function.
  • Constructor Summary

    Constructors
    Constructor Description
    ListSized​(int size, java.lang.Object... funcs)  
    ListSized​(java.lang.Object sizeFunc, java.lang.Object... funcs)  
  • Method Summary

    Modifier and Type Method Description
    java.util.List<java.lang.Object> apply​(long value)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ListSized

      public ListSized​(java.lang.Object sizeFunc, java.lang.Object... funcs)
    • ListSized

      public ListSized​(int size, java.lang.Object... funcs)
  • Method Details

    • apply

      public java.util.List<java.lang.Object> apply​(long value)
      Specified by:
      apply in interface java.util.function.LongFunction<java.util.List<java.lang.Object>>