Javadoc update

This commit is contained in:
David Noble
2019-09-17 00:22:04 -07:00
parent dee374eacc
commit c2449381ae
21 changed files with 45 additions and 44 deletions

View File

@@ -7,7 +7,7 @@ package com.azure.data.cosmos.serialization.hybridrow;
* Represents an IEEE 754-2008 128-bit decimal floating point number. * Represents an IEEE 754-2008 128-bit decimal floating point number.
* <p> * <p>
* The {@link Float128} represents an IEEE 754-2008 floating point number as a pair of {@code long} values: * The {@link Float128} represents an IEEE 754-2008 floating point number as a pair of {@code long} values:
* {@link #high} and {@link #low}. * {@link #high()} and {@link #low()}.
* *
* @see <a href="https://en.wikipedia.org/wiki/Decimal128_floating-point_format">decimal128 floating-point format</a> * @see <a href="https://en.wikipedia.org/wiki/Decimal128_floating-point_format">decimal128 floating-point format</a>
* @see <a href="https://ieeexplore.ieee.org/document/4610935">754-2008: IEEE Standard for Floating-Point Arithmetic</a> * @see <a href="https://ieeexplore.ieee.org/document/4610935">754-2008: IEEE Standard for Floating-Point Arithmetic</a>

View File

@@ -3684,7 +3684,7 @@ public final class RowBuffer {
/** /**
* Represents a single item within a set/map scope that needs to be indexed. * Represents a single item within a set/map scope that needs to be indexed.
* <p> * <p>
* This structure is used when rebuilding a set/map index during row streaming via {@link RowWriter}.Each item * This structure is used when rebuilding a set/map index during row streaming via {@link RowWriter}. Each item
* encodes its offsets and length within the row. * encodes its offsets and length within the row.
*/ */
static final class UniqueIndexItem { static final class UniqueIndexItem {

View File

@@ -89,7 +89,7 @@ public final class RowCursor implements Cloneable {
/** /**
* Sets the layout type of an existing field. * Sets the layout type of an existing field.
* *
* @param value a {@link LayoutType layout type}. * @param value a {@link LayoutType}.
* @return a reference to this {@link RowCursor}. * @return a reference to this {@link RowCursor}.
*/ */
public RowCursor cellType(LayoutType value) { public RowCursor cellType(LayoutType value) {
@@ -100,7 +100,7 @@ public final class RowCursor implements Cloneable {
/** /**
* For types with generic parameters (e.g. {@link LayoutTuple}, the type parameters. * For types with generic parameters (e.g. {@link LayoutTuple}, the type parameters.
* *
* @return a {@link TypeArgumentList type argument argument list} or {@code null}. * @return a {@link TypeArgumentList} or {@code null}.
*/ */
public TypeArgumentList cellTypeArgs() { public TypeArgumentList cellTypeArgs() {
return this.cellTypeArgs; return this.cellTypeArgs;
@@ -109,7 +109,7 @@ public final class RowCursor implements Cloneable {
/** /**
* Sets the layout type arguments of an existing field. * Sets the layout type arguments of an existing field.
* *
* @param value a {@link TypeArgumentList type argument argument list}. * @param value a {@link TypeArgumentList} or {@code null}.
* @return a reference to this {@link RowCursor}. * @return a reference to this {@link RowCursor}.
*/ */
public RowCursor cellTypeArgs(TypeArgumentList value) { public RowCursor cellTypeArgs(TypeArgumentList value) {

View File

@@ -62,7 +62,7 @@ public final class DateTimeCodec {
/** /**
* Decode an {@link OffsetDateTime} serialized like a {@code System.DateTime} 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. * @param bytes an array containing the serialized value to be decoded.
* @return a new {@link OffsetDateTime}. * @return a new {@link OffsetDateTime}.
* @see <a href="https://referencesource.microsoft.com/mscorlib/a.html#df6b1eba7461813b">struct DateTime source</a> * @see <a href="https://referencesource.microsoft.com/mscorlib/a.html#df6b1eba7461813b">struct DateTime source</a>
*/ */

View File

@@ -64,7 +64,7 @@ public final class DecimalCodec {
/** /**
* Decode an {@link BigDecimal} serialized like a {@code System.Decimal} 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.Decimal} to be decoded. * @param bytes an array containing the serialized {@code System.Decimal} to be decoded.
* @return a new {@link BigDecimal}. * @return a new {@link BigDecimal}.
* @see <a href="https://referencesource.microsoft.com/mscorlib/system/decimal.cs.html">struct Decimal source</a> * @see <a href="https://referencesource.microsoft.com/mscorlib/system/decimal.cs.html">struct Decimal source</a>
*/ */

View File

@@ -22,7 +22,7 @@ public final class Float128Codec {
/** /**
* Decode a {@link Float128} from a sequence of two {@code long}s in little endian format. * 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. * @param bytes an array containing the serialized {@link Float128} to be decoded.
* @return a new {@link Float128}. * @return a new {@link Float128}.
*/ */
public static Float128 decode(@Nonnull final byte[] bytes) { public static Float128 decode(@Nonnull final byte[] bytes) {

View File

@@ -56,7 +56,7 @@ public final class GuidCodec {
/** /**
* Decode a {@link UUID} serialized like a {@code System.Guid} by {@code MemoryMarshal.Write}. * 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. * @param bytes an array containing the serialized {@link UUID} to be decoded.
* @return a new {@link UUID}. * @return a new {@link UUID}.
*/ */
public static UUID decode(@Nonnull final byte[] bytes) { public static UUID decode(@Nonnull final byte[] bytes) {

View File

@@ -62,7 +62,7 @@ public final class Murmur3Hash {
} }
/** /**
* Computes a 128-bit Murmur3Hash 128-bit value for a {@link boolean} data item. * Computes a 128-bit Murmur3Hash 128-bit value for a {@code boolean} data item.
* *
* @param item The data to hash. * @param item The data to hash.
* @param seed The seed with which to initialize. * @param seed The seed with which to initialize.

View File

@@ -14,7 +14,7 @@ public final class LayoutBit {
private final int index; private final int index;
/** /**
* Initializes a new instance of the {@link LayoutBit} struct. * Initializes a new instance of the {@link LayoutBit} class.
* *
* @param index The zero-based offset into the layout bitmask. * @param index The zero-based offset into the layout bitmask.
*/ */
@@ -35,9 +35,9 @@ public final class LayoutBit {
} }
/** /**
* Zero-based bit from the beginning of the byte that contains this bit * Zero-based bit from the beginning of the byte that contains this bit.
* <p> * <p>
* Also see {@link #offset} to identify relevant byte. * Also see {@link #offset(int)} to identify relevant byte.
* *
* @return The bit of the byte within the bitmask. * @return The bit of the byte within the bitmask.
*/ */
@@ -46,7 +46,9 @@ public final class LayoutBit {
} }
/** /**
* Zero-based offset into the layout bitmask * Zero-based offset into the layout bitmask.
*
* @return zero-based offset into the layout bitmask.
*/ */
public int index() { public int index() {
return this.index; return this.index;
@@ -57,9 +59,9 @@ public final class LayoutBit {
} }
/** /**
* Returns the zero-based byte offset from the beginning of the row or scope that contains the bit from the bitmask * Returns the zero-based byte offset from the beginning of the row or scope that contains the bit from the bitmask.
* <p> * <p>
* Also see {@link #bit} to identify. * Also see {@link #bit()} to identify.
* *
* @param offset The byte offset from the beginning of the row where the scope begins. * @param offset The byte offset from the beginning of the row where the scope begins.
* @return The byte offset containing this bit. * @return The byte offset containing this bit.

View File

@@ -16,12 +16,12 @@ public final class LayoutCodeTraits {
} }
/** /**
* Returns a canonicalized version of the specified layout code * Returns a canonicalized version of the specified layout code.
* <p> * <p>
* Some codes (e.g. {@link LayoutCode#BOOLEAN} use multiple type codes to also encode values. This function converts * Some codes (e.g. {@link LayoutCode#BOOLEAN} use multiple type codes to also encode values. This function converts
* actual value based code into the canonicalized type code for schema comparisons. * actual value based code into the canonicalized type code for schema comparisons.
* *
* @param code The code to canonicalize * @param code The code to canonicalize.
*/ */
public static LayoutCode canonicalize(LayoutCode code) { public static LayoutCode canonicalize(LayoutCode code) {
return (code == LayoutCode.BOOLEAN_FALSE) ? LayoutCode.BOOLEAN : code; return (code == LayoutCode.BOOLEAN_FALSE) ? LayoutCode.BOOLEAN : code;

View File

@@ -77,8 +77,8 @@ public final class LayoutColumn {
/** /**
* Full logical path of the field within the row * Full logical path of the field within the row
* <p> * <p>
* Paths are expressed in dotted notation: e.g. a relative {@link #path} of 'b.c' within the scope 'a' yields a * Paths are expressed in dotted notation: e.g. a relative {@link #path()} of 'b.c' within the scope 'a' yields a
* {@link #fullPath} of 'a.b.c'. * full path of 'a.b.c'.
*/ */
public @Nonnull Utf8String fullPath() { public @Nonnull Utf8String fullPath() {
return this.fullPath; return this.fullPath;
@@ -101,12 +101,12 @@ public final class LayoutColumn {
} }
/** /**
* If {@link #storage} equals {@link StorageKind#FIXED} then the byte offset to the field location. * If {@link #storage()} equals {@link StorageKind#FIXED} then the byte offset to the field location.
* <p> * <p>
* If {@link #storage} equals {@link StorageKind#VARIABLE} then the zero-based index of the field from the * If {@link #storage()} equals {@link StorageKind#VARIABLE} then the zero-based index of the field from the
* beginning of the variable length segment. * beginning of the variable length segment.
* <p> * <p>
* For all other values of {@link #storage}, {@link #offset} is ignored. * For all other values of {@link #storage()}, {@code offset} is ignored.
*/ */
public int offset() { public int offset() {
return this.offset; return this.offset;
@@ -130,7 +130,7 @@ public final class LayoutColumn {
} }
/** /**
* If {@link LayoutType#isBoolean} then the zero-based extra index within the bool byte * If {@link LayoutType#isBoolean()} then the zero-based extra index within the bool byte
* holding the value of this type, otherwise must be 0. * holding the value of this type, otherwise must be 0.
*/ */
public int size() { public int size() {

View File

@@ -350,12 +350,12 @@ public final class LayoutCompiler {
assert logicalType instanceof TaggedPropertyType; assert logicalType instanceof TaggedPropertyType;
TaggedPropertyType tg = (TaggedPropertyType) logicalType; TaggedPropertyType tg = (TaggedPropertyType) logicalType;
if (tg.items().size() < TaggedPropertyType.MinTaggedArguments || (tg.items().size() > TaggedPropertyType.MaxTaggedArguments)) { if (tg.items().size() < TaggedPropertyType.MIN_TAGGED_ARGUMENTS || (tg.items().size() > TaggedPropertyType.MAX_TAGGED_ARGUMENTS)) {
throw new LayoutCompilationException(lenientFormat( throw new LayoutCompilationException(lenientFormat(
"Invalid number of arguments in Tagged: %s <= %s <= %s", "Invalid number of arguments in Tagged: %s <= %s <= %s",
TaggedPropertyType.MinTaggedArguments, TaggedPropertyType.MIN_TAGGED_ARGUMENTS,
tg.items().size(), tg.items().size(),
TaggedPropertyType.MaxTaggedArguments TaggedPropertyType.MAX_TAGGED_ARGUMENTS
)); ));
} }

View File

@@ -11,7 +11,7 @@ import com.azure.data.cosmos.serialization.hybridrow.RowCursor;
import java.util.List; import java.util.List;
/** /**
* An optional interface that indicates a {@link LayoutType{T}} can also read using a read-only {@link List{T}} * An optional interface that indicates a {@link LayoutType} can also read using a read-only {@link List}
* *
* @param <TElement> The sub-element type to be written * @param <TElement> The sub-element type to be written
*/ */

View File

@@ -10,7 +10,7 @@ import com.azure.data.cosmos.serialization.hybridrow.RowCursor;
import java.util.List; import java.util.List;
/** /**
* An optional interface that indicates a {@link LayoutType{T}} can also write using a {@link List{T}} * An optional interface that indicates a {@link LayoutType} can also write using a {@link List}
* *
* @param <TElement> The sub-element type to be written * @param <TElement> The sub-element type to be written
*/ */

View File

@@ -15,7 +15,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
public abstract class LayoutTypePrimitive<T> extends LayoutType implements ILayoutType { public abstract class LayoutTypePrimitive<T> extends LayoutType implements ILayoutType {
/** /**
* Initializes a new instance of the {@link LayoutType<T>} class. * Initializes a new instance of the {@link LayoutTypePrimitive<T>} class.
* *
* @param code * @param code
* @param immutable * @param immutable

View File

@@ -104,7 +104,7 @@ public abstract class LayoutTypeScope extends LayoutType {
* {@code true} if writing an item in the specified typed scope would elide the type code because it is implied by * {@code true} if writing an item in the specified typed scope would elide the type code because it is implied by
* the type arguments * the type arguments
* *
* @param edit a non-null {@link RowCursor} specifying a typed scope * @param edit a non-null {@link RowCursor} specifying a typed scope.
* @return {@code true} if the type code is implied (not written); {@code false} otherwise. * @return {@code true} if the type code is implied (not written); {@code false} otherwise.
*/ */
public boolean hasImplicitTypeCode(@Nonnull final RowCursor edit) { public boolean hasImplicitTypeCode(@Nonnull final RowCursor edit) {

View File

@@ -12,7 +12,7 @@ import com.azure.data.cosmos.serialization.hybridrow.RowCursor;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
/** /**
* An optional interface that indicates a {@link LayoutType{T}} can also be read as a {@link Utf8String}. * An optional interface that indicates a {@link LayoutType} can also be read as a {@link Utf8String}.
*/ */
public interface LayoutUtf8Readable extends ILayoutType { public interface LayoutUtf8Readable extends ILayoutType {

View File

@@ -11,7 +11,7 @@ import com.azure.data.cosmos.serialization.hybridrow.RowCursor;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
/** /**
* An optional interface that indicates a {@link LayoutType{T}} can also write using a {@link Utf8String} * An optional interface that indicates a {@link LayoutType} can also write using a {@link Utf8String}
*/ */
public interface LayoutUtf8Writable extends ILayoutType { public interface LayoutUtf8Writable extends ILayoutType {

View File

@@ -7,7 +7,7 @@ package com.azure.data.cosmos.serialization.hybridrow.schemas;
* Array properties represent an unbounded set of zero or more items. * Array properties represent an unbounded set of zero or more items.
* <p> * <p>
* Arrays may be typed or untyped. Within typed arrays, all items MUST be the same type. The type of items is specified * Arrays may be typed or untyped. Within typed arrays, all items MUST be the same type. The type of items is specified
* via {@link #items}. Typed arrays may be stored more efficiently than untyped arrays. When {@link #items} is * via {@link #items()}. Typed arrays may be stored more efficiently than untyped arrays. When {@link #items()} is
* unspecified, the array is untyped and its items may be heterogeneous. * unspecified, the array is untyped and its items may be heterogeneous.
*/ */
public class ArrayPropertyType extends ScopePropertyType { public class ArrayPropertyType extends ScopePropertyType {

View File

@@ -7,8 +7,8 @@ package com.azure.data.cosmos.serialization.hybridrow.schemas;
* Map properties represent an unbounded set of zero or more key-value pairs with unique keys. * Map properties represent an unbounded set of zero or more key-value pairs with unique keys.
* <p> * <p>
* Maps are typed or untyped. Within typed maps, all key MUST be the same type, and all values MUST be the same type. * Maps are typed or untyped. Within typed maps, all key MUST be the same type, and all values MUST be the same type.
* The type of both key and values is specified via {@link #keys} and {@link #values} respectively. Typed maps may be * The type of both key and values is specified via {@link #keys()} and {@link #values()} respectively. Typed maps may
* stored more efficiently than untyped maps. When {@link #keys} or {@link #values} is unspecified or marked * be stored more efficiently than untyped maps. When {@link #keys()} or {@link #values()} is unspecified or marked
* {@link TypeKind#ANY}, the map is untyped and its key and/or values may be heterogeneous. * {@link TypeKind#ANY}, the map is untyped and its key and/or values may be heterogeneous.
*/ */
public class MapPropertyType extends ScopePropertyType { public class MapPropertyType extends ScopePropertyType {

View File

@@ -10,27 +10,26 @@ import java.util.List;
* Tagged properties pair one or more typed values with an API-specific uint8 type code. * Tagged properties pair one or more typed values with an API-specific uint8 type code.
* <p> * <p>
* The {@code UInt8} type code is implicitly in position 0 within the resulting tagged and should not be specified in * The {@code UInt8} type code is implicitly in position 0 within the resulting tagged and should not be specified in
* {@link #items}. * {@link #items()}.
*/ */
public class TaggedPropertyType extends ScopePropertyType { public class TaggedPropertyType extends ScopePropertyType {
public static final int MaxTaggedArguments = 2; public static final int MAX_TAGGED_ARGUMENTS = 2;
public static final int MinTaggedArguments = 1; public static final int MIN_TAGGED_ARGUMENTS = 1;
/**
* Types of the elements of the tagged in element order.
*/
private List<PropertyType> items; private List<PropertyType> items;
/** /**
* Initializes a new instance of the {@link TaggedPropertyType} class. * Initializes a new instance of the {@link TaggedPropertyType} class.
*/ */
public TaggedPropertyType() { public TaggedPropertyType() {
this.items = new ArrayList<PropertyType>(); this.items = new ArrayList<>();
} }
/** /**
* Types of the elements of the tagged in element order. * Types of the elements of the tagged in element order.
* @return *
* @return a list of property types.
*/ */
public final List<PropertyType> items() { public final List<PropertyType> items() {
return this.items; return this.items;