Example usage for com.google.common.hash PrimitiveSink putUnencodedChars

List of usage examples for com.google.common.hash PrimitiveSink putUnencodedChars

Introduction

In this page you can find the example usage for com.google.common.hash PrimitiveSink putUnencodedChars.

Prototype

PrimitiveSink putUnencodedChars(CharSequence charSequence);

Source Link

Document

Puts each 16-bit code unit from the CharSequence into this sink.

Usage

From source file:com.google.caliper.model.StringMapFunnel.java

@Override
public void funnel(Map<String, String> from, PrimitiveSink into) {
    for (Entry<String, String> entry : from.entrySet()) {
        into.putUnencodedChars(entry.getKey()).putByte((byte) -1) // separate key and value
                .putUnencodedChars(entry.getValue());
    }//from   ww w.  ja v a 2s. c  o  m
}

From source file:at.alladin.rmbt.mapServer.parameters.TileParameters.java

@Override
public void funnel(TileParameters o, PrimitiveSink into) {
    into.putUnencodedChars(o.getClass().getCanonicalName()).putInt(o.size).putUnencodedChars(o.mapOption)
            .putFloat(o.quantile).putDouble(o.transparency)
            .putUnencodedChars(Strings.nullToEmpty(o.developerCode));
    o.path.funnel(o.path, into);/*from  w w  w .j  a va 2  s.  c  o m*/
    FILTER_MAP_FUNNEL.funnel(o.filterMap.entrySet(), into);
}

From source file:at.alladin.rmbt.mapServer.parameters.ShapeTileParameters.java

@Override
public void funnel(TileParameters o, PrimitiveSink into) {
    super.funnel(o, into);
    if (o instanceof ShapeTileParameters) {
        final ShapeTileParameters _o = (ShapeTileParameters) o;
        into.putUnencodedChars(Strings.nullToEmpty(_o.shapeType));
    }/*from  ww w .ja v a 2 s .  c om*/
}

From source file:at.alladin.rmbt.statisticServer.StatisticParameters.java

@Override
public void funnel(StatisticParameters o, PrimitiveSink into) {
    into.putUnencodedChars(o.getClass().getCanonicalName()).putChar(':')
            .putUnencodedChars(Strings.nullToEmpty(o.lang)).putFloat(o.quantile).putInt(o.duration)
            .putUnencodedChars(Strings.nullToEmpty(o.type)).putInt(o.maxDevices)
            .putUnencodedChars(Strings.nullToEmpty(o.networkTypeGroup)).putDouble(o.accuracy)
            .putUnencodedChars(Strings.nullToEmpty(o.country)).putBoolean(o.userServerSelection)
            .putInt((endDate == null) ? 0 : (int) endDate.getTime()).putInt(o.province);
}

From source file:at.alladin.rmbt.mapServer.parameters.PointTileParameters.java

@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());
    }//ww  w.j  a  v  a2 s . c om
}