Class StringSet

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

public class StringSet
extends java.lang.Object
implements java.util.function.LongFunction<java.util.Set<java.lang.String>>
Create a Set<String> from a long based on two functions, the first to determine the set size, and the second to populate the set with String values. The input fed to the second function is incremented between elements. Regardless of the object type provided by the second function, Object.toString() is used to get the value to add to the list. To create Sets of any type of object simply use Set with a specific value mapping function.
  • Constructor Summary

    Constructors 
    Constructor Description
    StringSet​(java.util.function.LongToIntFunction sizeFunc, java.util.function.LongFunction<java.lang.Object> valueFunc)  
  • Method Summary

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

    Methods inherited from class java.lang.Object

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

    • StringSet

      public StringSet​(java.util.function.LongToIntFunction sizeFunc, java.util.function.LongFunction<java.lang.Object> valueFunc)
  • Method Details

    • apply

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