public static SingleItemSketch create ( final String datum , final long seed ) { if ( ( datum == null ) || datum . isEmpty ( ) ) { return null ; } final byte [ ] data = datum . getBytes ( UTF_8 ) ; return new SingleItemSketch ( hash ( data , seed ) [ 0 ] >>> 1 , seed ) ; }
Create this sketch with the given String and a seed . The string is converted to a byte array using UTF8 encoding . If the string is null or empty no create attempt is made and the method returns null .