diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-12-14 11:28:18 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-12-14 11:28:18 +0100 |
commit | b4e3917d746fcf4be76d353be7c3b4ae9b229973 (patch) | |
tree | 9bbc8f32467adbc022ff1464e0e3514076c79a36 /vespajlib/src/main/java | |
parent | 7b8bb9e7e84c43240457e24bd846291c24221747 (diff) |
Support for configuring and feeding float16 and bool field types
Diffstat (limited to 'vespajlib/src/main/java')
3 files changed, 14 insertions, 11 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/text/Utf8.java b/vespajlib/src/main/java/com/yahoo/text/Utf8.java index 1630d267302..6f40b590a64 100644 --- a/vespajlib/src/main/java/com/yahoo/text/Utf8.java +++ b/vespajlib/src/main/java/com/yahoo/text/Utf8.java @@ -109,12 +109,13 @@ public final class Utf8 { /** * Will try an optimistic approach to utf8 encoding. * That is 4.6x faster that the brute encode for ascii, not accounting for reduced memory footprint and GC. - * @param str The string to encode. + * + * @param string The string to encode. * @return Utf8 encoded array */ - public static byte[] toBytes(String str) { - byte [] utf8 = toBytesAscii(str); - return utf8 != null ? utf8 : str.getBytes(StandardCharsets.UTF_8); + public static byte[] toBytes(String string) { + byte [] utf8 = toBytesAscii(string); + return utf8 != null ? utf8 : string.getBytes(StandardCharsets.UTF_8); } /** * Will try an optimistic approach to utf8 decoding. diff --git a/vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java b/vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java index 0aee5fcdea5..3e392448ce2 100644 --- a/vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java +++ b/vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java @@ -175,9 +175,9 @@ public class Identifiable extends Selectable implements Cloneable { * * <code>public static int classId = registerClass(<id>, <ClassName>.class);</code> * - * @param id The class identifier to register with. - * @param spec The class to register. - * @return the identifier argument. + * @param id the class identifier to register with + * @param spec the class to register + * @return the identifier argument */ protected static int registerClass(int id, Class<? extends Identifiable> spec) { if (registry == null) { diff --git a/vespajlib/src/main/java/com/yahoo/vespa/objects/Ids.java b/vespajlib/src/main/java/com/yahoo/vespa/objects/Ids.java index 64a62ae37f3..02ae6a58bf7 100644 --- a/vespajlib/src/main/java/com/yahoo/vespa/objects/Ids.java +++ b/vespajlib/src/main/java/com/yahoo/vespa/objects/Ids.java @@ -8,8 +8,10 @@ package com.yahoo.vespa.objects; * @author baldersheim */ public interface Ids { - public static int document = 0x1000; - public static int searchlib = 0x4000; - public static int vespa_configmodel = 0x7000; - public static int annotation = 0x10000; + + int document = 0x1000; + int searchlib = 0x4000; + int vespa_configmodel = 0x7000; + int annotation = 0x10000; + } |