diff --git a/java/src/main/java/com/azure/data/cosmos/core/Utf8String.java b/java/src/main/java/com/azure/data/cosmos/core/Utf8String.java index 5feec9e..1d4e443 100644 --- a/java/src/main/java/com/azure/data/cosmos/core/Utf8String.java +++ b/java/src/main/java/com/azure/data/cosmos/core/Utf8String.java @@ -83,14 +83,14 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * {@code true} if the length of this instance is zero + * {@code true} if the length of this instance is zero. */ public final boolean isEmpty() { return this.buffer != null && this.buffer.writerIndex() == 0; } /** - * {@code true} if this instance is null + * {@code true} if this instance is null. */ public final boolean isNull() { return this.buffer == null; @@ -102,7 +102,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Non-allocating enumeration of each character in the UTF-8 stream + * Non-allocating enumeration of each character in the UTF-8 stream. */ @Override public IntStream chars() { @@ -110,7 +110,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Non-allocating enumeration of each code point in the UTF-8 stream + * Non-allocating enumeration of each code point in the UTF-8 stream. */ public final IntStream codePoints() { @@ -162,7 +162,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Returns a reference to the read-only {@link ByteBuf} holding the content of this {@link Utf8String} + * Returns a reference to the read-only {@link ByteBuf} holding the content of this {@link Utf8String}. *

* A value of {@code null} is returns, if this {@link Utf8String} is null. * @return reference to the read-only {@link ByteBuf} holding the content of this {@link Utf8String}. @@ -173,7 +173,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Creates a deep copy of this {@link Utf8String} + * Creates a deep copy of this {@link Utf8String}. */ @Override public Utf8String copy() { @@ -181,7 +181,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Duplicates this {@link Utf8String} + * Duplicates this {@link Utf8String}. *

* Be aware that this will not automatically call {@link #retain()}. */ @@ -191,9 +191,10 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Encoded length of this {@link Utf8String} + * Encoded length of this {@link Utf8String}. *

- * This is the same value as would be returned by {@link String#getBytes()#utf16CodeUnitCount} with no time or space overhead. + * This is the same value as would be returned by {@link String#getBytes()#utf16CodeUnitCount} with no time or space + * overhead. * * @return encoded length of {@link Utf8String} */ @@ -235,9 +236,9 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Creates a new {@link Utf8String} from a {@link ByteBuf} with UTF-8 character validation + * Creates a new {@link Utf8String} from a {@link ByteBuf} with UTF-8 character validation. *

- * The {@link Utf8String} created retains the {@link ByteBuf}. (No data is transferred.) + * The {@link Utf8String} created retains the {@link ByteBuf}. No data is transferred. * * @param buffer The {@link ByteBuf} to validate and assign to the {@link Utf8String} created. * @return A {@link Utf8String} instance, if the @{code buffer} validates or a value of @{link Optional#empty} @@ -280,7 +281,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Returns the reference count of this {@link Utf8String} + * Returns the reference count of this {@link Utf8String}. *

* If {@code 0}, it means this object has been deallocated. */ @@ -302,7 +303,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Decreases the reference count by the specified {@code decrement} + * Decreases the reference count by the specified {@code decrement}. * * The underlying storage for this instance is deallocated, if the reference count reaches {@code 0}. * @@ -376,7 +377,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable } /** - * Creates a {@link Utf8String} from a UTF16 encoding string + * Creates a {@link Utf8String} from a UTF16 encoding string. *

* This method must transcode the UTF-16 into UTF-8 which both requires allocation and is a size of data operation. * @@ -422,8 +423,8 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable /** * Returns the next {@code int} element in the iteration. * - * @return the next {@code int} element in the iteration - * @throws NoSuchElementException if the iteration has no more elements + * @return the next {@code int} element in the iteration. + * @throws NoSuchElementException if the iteration has no more elements. */ @Override public int nextInt() { @@ -581,7 +582,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable * single-byte UTF-8 code units in the code point. *

* Code points are validated. The {@link #process(byte)} method returns the Unicode - * Replacement character + * Replacement Character * when an undefined code point is encountered. * * @see RFC 3629: UTF-8, a transformation format of ISO 10646 diff --git a/java/src/main/java/com/azure/data/cosmos/core/UtfAnyString.java b/java/src/main/java/com/azure/data/cosmos/core/UtfAnyString.java index 370e780..157860b 100644 --- a/java/src/main/java/com/azure/data/cosmos/core/UtfAnyString.java +++ b/java/src/main/java/com/azure/data/cosmos/core/UtfAnyString.java @@ -9,7 +9,7 @@ import static com.azure.data.cosmos.core.Utf8String.transcodeUtf16; import static com.google.common.base.Preconditions.checkNotNull; /** - * A string whose memory representation may be either UTF-8 or UTF-16 + * A string whose memory representation may be either UTF-8 or UTF-16. *

* This type supports polymorphic use of {@link String} and {@link Utf8String} when equality, hashing, and comparison * are needed against either encoding. An API leveraging {@link UtfAnyString} can avoid separate method overloads @@ -40,14 +40,14 @@ public final class UtfAnyString implements CharSequence, Comparable * An index ranges from zero to {@link UtfAnyString#length()} minus one. The first {@code char} value of the * sequence is at index zero, the next at index one, and so on, as for array indexing. If the {@code char} @@ -230,11 +230,12 @@ public final class UtfAnyString implements CharSequence, Comparable + * The length is the number of 16-bit {@code char}s in the sequence. * - * @return the number of {@code char}s in this sequence - * @throws UnsupportedOperationException if this {@link UtfAnyString} is {@code null} + * @return the number of {@code char}s in this sequence. + * @throws UnsupportedOperationException if this {@link UtfAnyString} is {@code null}. */ @Override public int length() { @@ -245,7 +246,7 @@ public final class UtfAnyString implements CharSequence, Comparable * The subsequence starts with the {@code char} value at the specified index and ends with the{@code char} value at * index {@code end - 1}. The length (in {@code char}s) of the returned sequence is {@code end - start}, so if diff --git a/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/DateTimeCodec.java b/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/DateTimeCodec.java index 54c7c06..110569f 100644 --- a/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/DateTimeCodec.java +++ b/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/DateTimeCodec.java @@ -32,10 +32,10 @@ public final class DateTimeCodec { } /** - * Decode an {@link OffsetDateTime} from a {@code System.DateTimeCodec} as serialized by {@code MemoryMarshal.Write} + * Decode an {@link OffsetDateTime} serialized like a {@code System.DateTime} by {@code MemoryMarshal.Write}. * - * @param bytes a {@link byte} array containing the serialized value to be decoded - * @return a new {@link OffsetDateTime} + * @param bytes a {@link byte} array containing the serialized value to be decoded. + * @return a new {@link OffsetDateTime}. * @see * struct DateTimeCodec source */ @@ -45,10 +45,10 @@ public final class DateTimeCodec { } /** - * Decode an {@link OffsetDateTime} from a {@code System.DateTimeCodec} as serialized by {@code MemoryMarshal.Write} + * Decode an {@link OffsetDateTime} serialized like a {@code System.DateTime} by {@code MemoryMarshal.Write}. * - * @param in a {@link ByteBuf} containing the serialized value to be decoded - * @return a new {@link OffsetDateTime} + * @param in a {@link ByteBuf} containing the serialized value to be decoded. + * @return a new {@link OffsetDateTime}. * @see * struct DateTimeCodec source */ @@ -68,10 +68,10 @@ public final class DateTimeCodec { } /** - * Encode an {@link OffsetDateTime} as a {@code System.DateTimeCodec} serialized by {@code MemoryMarshal.Write} + * Encode an {@link OffsetDateTime} like a {@code System.DateTime} serialized by {@code MemoryMarshal.Write}. * - * @param offsetDateTime an {@link OffsetDateTime} to be encoded - * @return a new byte array containing the encoded {@code offsetDateTime} + * @param offsetDateTime an {@link OffsetDateTime} to be encoded. + * @return a new byte array containing the encoded {@code offsetDateTime}. * @see * struct DateTimeCodec source */ @@ -82,10 +82,10 @@ public final class DateTimeCodec { } /** - * Encode an {@link OffsetDateTime} as a {@code System.DateTimeCodec} serialized by {@code MemoryMarshal.Write} + * Encode an {@link OffsetDateTime} like a {@code System.DateTime} produced by {@code MemoryMarshal.Write}. * - * @param offsetDateTime an {@link OffsetDateTime} to be encoded - * @param out an output {@link ByteBuf} + * @param offsetDateTime an {@link OffsetDateTime} to be encoded. + * @param out an output {@link ByteBuf}. * @see * struct DateTimeCodec source */ diff --git a/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/DecimalCodec.java b/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/DecimalCodec.java index 76be76a..b9b1e1c 100644 --- a/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/DecimalCodec.java +++ b/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/DecimalCodec.java @@ -46,10 +46,10 @@ public final class DecimalCodec { } /** - * Decode a {@link BigDecimal} from a {@code System.DecimalCodec} as serialized by {@code MemoryMarshal.Write} + * Decode an {@link BigDecimal} serialized like a {@code System.Decimal} by {@code MemoryMarshal.Write}. * - * @param bytes a {@link byte} array containing the serialized {@code System.DecimalCodec} to be decoded - * @return a new {@link BigDecimal} + * @param bytes a {@link byte} array containing the serialized {@code System.Decimal} to be decoded. + * @return a new {@link BigDecimal}. * @see * struct DecimalCodec source */ @@ -59,10 +59,10 @@ public final class DecimalCodec { } /** - * Decode a {@link BigDecimal} from a {@code System.DecimalCodec} value serialized by {@code MemoryMarshal.Write} + * Decode an {@link BigDecimal} serialized like a {@code System.Decimal} by {@code MemoryMarshal.Write}. * - * @param in a {@link ByteBuf} containing the serialized {@code System.DecimalCodec} to be decoded - * @return a new {@link BigDecimal} + * @param in a {@link ByteBuf} containing the serialized {@code System.Decimal} to be decoded. + * @return a new {@link BigDecimal}. * @see * struct DecimalCodec source */ @@ -106,10 +106,10 @@ public final class DecimalCodec { } /** - * Encode a {@link BigDecimal} as a {@code System.DecimalCodec} serialized by {@code MemoryMarshal.Write} + * Encode a {@link BigDecimal} like a {@code System.Decimal} serialized by {@code MemoryMarshal.Write}. * - * @param bigDecimal a {@link BigDecimal} to be encoded - * @return a new byte array containing the encoded {@code bigDecimal} + * @param bigDecimal a {@link BigDecimal} to be encoded. + * @return a new byte array containing the encoded {@code bigDecimal}. * @see * struct DecimalCodec source */ @@ -120,10 +120,10 @@ public final class DecimalCodec { } /** - * Encode a {@link BigDecimal} as a {@code System.DecimalCodec} serialized by {@code MemoryMarshal.Write} + * Encode a {@link BigDecimal} like a {@code System.Decimal} serialized by {@code MemoryMarshal.Write}. * - * @param value a {@link BigDecimal} to be encoded - * @param out an output {@link ByteBuf} + * @param value a {@link BigDecimal} to be encoded. + * @param out an output {@link ByteBuf}. * @see * struct DecimalCodec source */ diff --git a/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/Float128Codec.java b/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/Float128Codec.java index b8c277b..da61bdc 100644 --- a/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/Float128Codec.java +++ b/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/Float128Codec.java @@ -20,10 +20,10 @@ public final class Float128Codec { } /** - * Decode a {@link Float128} as serialized by Microsoft APIs like {@code System.GuidCodec.ToByteArray} + * Decode a {@link Float128} from a sequence of two {@code long}s in little endian format. * - * @param bytes a {@link byte} array containing the serialized {@link Float128} to be decoded - * @return a new {@link Float128} + * @param bytes a {@link byte} array containing the serialized {@link Float128} to be decoded. + * @return a new {@link Float128}. */ public static Float128 decode(@Nonnull final byte[] bytes) { checkNotNull(bytes); @@ -31,10 +31,10 @@ public final class Float128Codec { } /** - * Decode a {@link Float128} as serialized by Microsoft APIs like {@code System.GuidCodec.ToByteArray} + * Decode a {@link Float128} from a sequence of two {@code long}s in little endian format. * - * @param in a {@link ByteBuf} containing the serialized {@link Float128} to be decoded - * @return a new {@link Float128} + * @param in a {@link ByteBuf} containing the serialized {@link Float128} to be decoded. + * @return a new {@link Float128}. */ public static Float128 decode(@Nonnull final ByteBuf in) { @@ -48,10 +48,10 @@ public final class Float128Codec { } /** - * Encodes a {@link Float128} as serialized by Microsoft APIs like {@code System.GuidCodec.ToByteArray} + * Encodes a {@link Float128} as a sequence of two {@code long}s in little endian format. * - * @param value a {@link Float128} to be encoded - * @return a new byte array containing the encoded + * @param value a {@link Float128} to be encoded. + * @return a new byte array containing the encoded. */ public static byte[] encode(final Float128 value) { final byte[] bytes = new byte[BYTES]; @@ -60,10 +60,10 @@ public final class Float128Codec { } /** - * Encodes a {@link Float128} as serialized by Microsoft APIs like {@code System.GuidCodec.ToByteArray} + * Encodes a {@link Float128} as a sequence of two {@code long}s in little endian format. * - * @param value a {@link Float128} to be encoded - * @param out an output {@link ByteBuf} + * @param value a {@link Float128} to be encoded. + * @param out an output {@link ByteBuf}. */ public static void encode(final Float128 value, final ByteBuf out) { out.writeLongLE(value.high()); diff --git a/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/GuidCodec.java b/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/GuidCodec.java index 5de77d6..4ed4cb3 100644 --- a/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/GuidCodec.java +++ b/java/src/main/java/com/azure/data/cosmos/serialization/hybridrow/codecs/GuidCodec.java @@ -21,10 +21,10 @@ public final class GuidCodec { } /** - * Decode a {@link UUID} as serialized by Microsoft APIs like {@code System.GuidCodec.ToByteArray} + * Decode a {@link UUID} serialized like a {@code System.Guid} by {@code MemoryMarshal.Write}. * - * @param bytes a {@link byte} array containing the serialized {@link UUID} to be decoded - * @return a new {@link UUID} + * @param bytes a {@link byte} array containing the serialized {@link UUID} to be decoded. + * @return a new {@link UUID}. */ public static UUID decode(@Nonnull final byte[] bytes) { checkNotNull(bytes); @@ -32,9 +32,9 @@ public final class GuidCodec { } /** - * Decode a {@link UUID} as serialized by Microsoft APIs like {@code System.GuidCodec.ToByteArray} + * Decode a {@link UUID} serialized like a {@code System.Guid} by {@code MemoryMarshal.Write}. * - * @param in a {@link ByteBuf} containing the serialized {@link UUID} to be decoded + * @param in a {@link ByteBuf} containing the serialized {@link UUID} to be decoded; * @return a new {@link UUID} */ public static UUID decode(@Nonnull final ByteBuf in) { @@ -60,10 +60,10 @@ public final class GuidCodec { } /** - * Encodes a {@link UUID} as serialized by Microsoft APIs like {@code System.GuidCodec.ToByteArray} + * Encodes a {@link UUID} like a {@code System.Guid} serialized by {@code MemoryMarshal.Write}. * - * @param uuid a {@link UUID} to be encoded - * @return a new byte array containing the encoded + * @param uuid a {@link UUID} to be encoded. + * @return a new byte array containing the encoded. */ public static byte[] encode(final UUID uuid) { final byte[] bytes = new byte[BYTES]; @@ -72,10 +72,10 @@ public final class GuidCodec { } /** - * Encodes a {@link UUID} as serialized by Microsoft APIs like {@code System.GuidCodec.ToByteArray} + * Encodes a {@link UUID} like a {@code System.Guid} serialized by {@code MemoryMarshal.Write}. * - * @param uuid a {@link UUID} to be encoded - * @param out an output {@link ByteBuf} + * @param uuid a {@link UUID} to be encoded. + * @param out an output {@link ByteBuf}. */ public static void encode(final UUID uuid, final ByteBuf out) {