Java Code Examples for com.google.common.hash.PrimitiveSink#putUnencodedChars()

The following examples show how to use com.google.common.hash.PrimitiveSink#putUnencodedChars() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HashTestUtils.java    From zetasketch with Apache License 2.0 5 votes vote down vote up
@Override
void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) {
  char[] value = new char[random.nextInt(128)];
  for (int i = 0; i < value.length; i++) {
    value[i] = (char) random.nextInt();
  }
  String s = new String(value);
  for (PrimitiveSink sink : sinks) {
    sink.putUnencodedChars(s);
  }
}
 
Example 2
Source File: HashTestUtils.java    From zetasketch with Apache License 2.0 5 votes vote down vote up
@Override
void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) {
  String s = new String(new char[] {randomLowSurrogate(random)});
  for (PrimitiveSink sink : sinks) {
    sink.putUnencodedChars(s);
  }
}
 
Example 3
Source File: HashTestUtils.java    From zetasketch with Apache License 2.0 5 votes vote down vote up
@Override
void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) {
  String s = new String(new char[] {randomHighSurrogate(random)});
  for (PrimitiveSink sink : sinks) {
    sink.putUnencodedChars(s);
  }
}
 
Example 4
Source File: HashTestUtils.java    From zetasketch with Apache License 2.0 5 votes vote down vote up
@Override
void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) {
  String s = new String(new char[] {randomLowSurrogate(random), randomHighSurrogate(random)});
  for (PrimitiveSink sink : sinks) {
    sink.putUnencodedChars(s);
  }
}
 
Example 5
Source File: HashTestUtils.java    From zetasketch with Apache License 2.0 5 votes vote down vote up
@Override
void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) {
  String s = new String(new char[] {randomHighSurrogate(random), randomLowSurrogate(random)});
  for (PrimitiveSink sink : sinks) {
    sink.putUnencodedChars(s);
  }
}
 
Example 6
Source File: PointTileParameters.java    From open-rmbt with Apache License 2.0 5 votes vote down vote up
@Override
public void funnel(TileParameters o, PrimitiveSink into)
{
    super.funnel(o, into);
    if (o instanceof PointTileParameters)
    {
        final PointTileParameters _o = (PointTileParameters) o;
        into
            .putDouble(_o.pointDiameter)
            .putBoolean(_o.noFill)
            .putBoolean(_o.noColor);
        if (highlight != null)
            into.putUnencodedChars(highlight.toString());
    }
}