+ * Also see {@link #offset} to identify relevant byte. * * @return The bit of the byte within the bitmask. */ - // TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes: - //ORIGINAL LINE: [MethodImpl(MethodImplOptions.AggressiveInlining)] public int GetBit() - public int GetBit() { - return this.index % LayoutType.BitsPerByte; + public int bit() { + return this.index() % LayoutTypes.BitsPerByte; } /** - * Returns the 0-based byte offset from the beginning of the row or scope that contains the - * bit from the bitmask. + * Zero-based offset into the layout bitmask + */ + public int index() { + return this.index; + } + + /** + * Returns the zero-based byte offset from the beginning of the row or scope that contains the bit from the bitmask *
- * Also see {@link GetBit} to identify.
+ * Also see {@link #bit} to identify.
*
* @param offset The byte offset from the beginning of the row where the scope begins.
* @return The byte offset containing this bit.
*/
- // TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
- //ORIGINAL LINE: [MethodImpl(MethodImplOptions.AggressiveInlining)] public int GetOffset(int offset)
- public int GetOffset(int offset) {
- return offset + (this.index / LayoutType.BitsPerByte);
- }
-
- public LayoutBit clone() {
- LayoutBit varCopy = new LayoutBit();
-
- varCopy.index = this.index;
-
- return varCopy;
+ public int offset(int offset) {
+ return offset + (this.index() / LayoutTypes.BitsPerByte);
}
@Override
@@ -84,45 +69,19 @@ public final class LayoutBit implements IEquatable
- * 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'.
+ * For bool fields, zero-based index into the bit mask for the bool value.
*/
- public Utf8String getFullPath() {
+ public @Nonnull LayoutBit booleanBit() {
+ return this.booleanBit;
+ }
+
+ /**
+ * Full logical path of the field within the row
+ *
+ * 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'.
+ */
+ public @Nonnull Utf8String fullPath() {
return this.fullPath;
}
/**
- * 0-based index of the column within the structure. Also indicates which presence bit
- * controls this column.
+ * Zero-based index of the column within the structure
+ *
+ * This value also indicates which presence bit controls this column.
*/
- public int getIndex() {
+ public int index() {
return this.index;
}
/**
- * The layout of the parent scope, if a nested column, otherwise null.
+ * For nullable fields, the zero-based index into the bit mask for the null bit
*/
- public LayoutColumn getParent() {
+ public @Nonnull LayoutBit nullBit() {
+ return this.nullBit;
+ }
+
+ /**
+ * If {@link #storage} equals {@link StorageKind#Fixed} then the byte offset to the field location.
+ *
+ * If {@link #storage} equals {@link StorageKind#Variable} then the zero-based index of the field from the
+ * beginning of the variable length segment.
+ *
+ * For all other values of {@link #storage}, {@link #offset} is ignored.
+ */
+ public int offset() {
+ return this.offset;
+ }
+
+ /**
+ * Layout of the parent scope, if a nested column, otherwise null.
+ */
+ public LayoutColumn parent() {
return this.parent;
}
/**
* The relative path of the field within its parent scope.
*
- * 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'.
+ * 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'.
*/
- public Utf8String getPath() {
+ public @Nonnull Utf8String path() {
return this.path;
}
+ /**
+ * If {@link LayoutType#isBoolean} then the zero-based extra index within the bool byte
+ * holding the value of this type, otherwise must be 0.
+ */
+ public int size() {
+ return this.size;
+ }
+
/**
* The storage kind of the field.
*/
- public StorageKind getStorage() {
+ public @Nonnull StorageKind storage() {
return this.storage;
}
/**
* The physical layout type of the field.
*/
- public LayoutType getType() {
+ public @Nonnull LayoutType type() {
return this.type;
}
/**
- * The full logical type.
+ * The full logical type
*/
- public TypeArgument getTypeArg() {
- return this.typeArg.clone();
+ public @Nonnull TypeArgument typeArg() {
+ return this.typeArg;
}
/**
* For types with generic parameters (e.g. {@link LayoutTuple}, the type parameters.
*/
- public TypeArgumentList getTypeArgs() {
- return this.typeArgs.clone();
- }
-
- public void SetIndex(int index) {
- this.index = index;
- }
-
- public void SetOffset(int offset) {
- this.offset = offset;
+ public @Nonnull TypeArgumentList typeArgs() {
+ return this.typeArgs;
}
/**
* The physical layout type of the field cast to the specified type.
*/
- // TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
- //ORIGINAL LINE: [DebuggerHidden] public T TypeAs
* If a value exists, then it is removed. The remainder of the row is resized to accomodate
* a decrease in required space. If no value exists this operation is a no-op.
+ * @param b
+ * @param edit
*/
- public final Result deleteSparse(Reference