Class Combinations

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

public class Combinations
extends java.lang.Object
implements java.util.function.LongFunction<java.lang.String>
Convert a numeric value into a code according to ASCII printable characters. This is useful for creating various encodings using different character ranges, etc. This mapper can map over the sequences of character ranges providing every unique combination and then wrapping around to the beginning again. It can convert between character bases with independent radix in each position. Each position in the final string takes its values from a position-specific character set, described by the shorthand in the examples below. The constructor will throw an error if the number of combinations exceeds that which can be represented in a long value. (This is a very high number).
  • Constructor Summary

    Constructors 
    Constructor Description
    Combinations​(java.lang.String spec)  
  • Method Summary

    Modifier and Type Method Description
    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

    • Combinations

      public Combinations​(java.lang.String spec)
  • Method Details

    • apply

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