Show / Hide Table of Contents

Struct BigtableByteString

A sequence of bytes which can be used for a row key, column qualifier, or cell value.

Implements
System.IComparable
System.IComparable<BigtableByteString>
System.IEquatable<BigtableByteString>
System.Collections.Generic.IEnumerable<System.Byte>
System.Collections.IEnumerable
Inherited Members
System.Object.GetType()
Namespace: Google.Cloud.Bigtable.Common.V2
Assembly: Google.Cloud.Bigtable.Common.V2.dll
Syntax
public struct BigtableByteString : IComparable, IComparable<BigtableByteString>, IEquatable<BigtableByteString>, IEnumerable<byte>, IEnumerable

Constructors

BigtableByteString(ByteString)

Creates a BigtableByteString value from a byte string.

Declaration
public BigtableByteString(ByteString value)
Parameters
Type Name Description
ByteString value

The byte string making up the value. May be null in which case the empty byte string is used.

BigtableByteString(Byte[])

Creates a BigtableByteString value from an array of bytes.

Declaration
public BigtableByteString(params byte[] value)
Parameters
Type Name Description
System.Byte[] value

The bytes making up the byte string. May be null in which case the empty byte string is used.

BigtableByteString(Int64)

Creates a BigtableByteString value from the big-endian encoding of a signed 64-bit value.

Declaration
public BigtableByteString(long value)
Parameters
Type Name Description
System.Int64 value

The 64-bit value which should be used to initialize the byte string.

BigtableByteString(String)

Creates a BigtableByteString value from the UTF-8 encoding of a string.

Declaration
public BigtableByteString(string valueAsUtf8)
Parameters
Type Name Description
System.String valueAsUtf8

The value whose UTF-8 representation should be used to initialize the byte string. May be null in which case the empty byte string is used.

Properties

IsEmpty

Returns true if the byte string is empty, false otherwise.

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
System.Boolean

Item[Int32]

Returns the byte at index index.

Declaration
public byte this[int index] { get; }
Parameters
Type Name Description
System.Int32 index

The index in the byte string to return. Must be greater than or equal to 0, and less than Length.

Property Value
Type Description
System.Byte

The byte at index index.

Length

Gets the number of bytes in the byte string.

Declaration
public int Length { get; }
Property Value
Type Description
System.Int32

Value

Gets the underlying byte string.

Declaration
public ByteString Value { get; }
Property Value
Type Description
ByteString

Methods

Compare(BigtableByteString, BigtableByteString)

Compares two BigtableByteString values lexicographically.

Declaration
public static int Compare(BigtableByteString x, BigtableByteString y)
Parameters
Type Name Description
BigtableByteString x

Left value to compare

BigtableByteString y

Right value to compare

Returns
Type Description
System.Int32

true if x is less than y; otherwise false.

CompareTo(BigtableByteString)

Declaration
public int CompareTo(BigtableByteString other)
Parameters
Type Name Description
BigtableByteString other
Returns
Type Description
System.Int32
Implements
System.IComparable<T>.CompareTo(T)

CompareTo(Object)

Declaration
public int CompareTo(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Int32
Implements
System.IComparable.CompareTo(System.Object)

GetEnumerator()

Declaration
public IEnumerator<byte> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<System.Byte>
Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

Operators

Equality(BigtableByteString, BigtableByteString)

Operator overload to compare two BigtableByteString values for equality.

Declaration
public static bool operator ==(BigtableByteString x, BigtableByteString y)
Parameters
Type Name Description
BigtableByteString x

Left value to compare

BigtableByteString y

Right value to compare

Returns
Type Description
System.Boolean

true if x is equal to y; otherwise false.

Explicit(BigtableByteString to ByteString)

Converts the BigtableByteString value to its underlying byte string.

Declaration
public static explicit operator ByteString(BigtableByteString value)
Parameters
Type Name Description
BigtableByteString value

The BigtableByteString value to convert.

Returns
Type Description
ByteString

Explicit(BigtableByteString to Byte[])

Converts the BigtableByteString value to its underlying byte array.

Declaration
public static explicit operator byte[](BigtableByteString value)
Parameters
Type Name Description
BigtableByteString value

The BigtableByteString value to convert.

Returns
Type Description
System.Byte[]

Explicit(BigtableByteString to Int64)

Converts the BigtableByteString value to its a signed 64-bit value assuming it is big-endian encoded.

Declaration
public static explicit operator long (BigtableByteString value)
Parameters
Type Name Description
BigtableByteString value

The BigtableByteString value to convert.

Returns
Type Description
System.Int64

Explicit(BigtableByteString to String)

Converts the BigtableByteString value to a string assuming it is UTF-8 encoded.

Declaration
public static explicit operator string (BigtableByteString value)
Parameters
Type Name Description
BigtableByteString value

The BigtableByteString value to convert.

Returns
Type Description
System.String

GreaterThan(BigtableByteString, BigtableByteString)

Operator overload to compare two BigtableByteString values.

Declaration
public static bool operator>(BigtableByteString x, BigtableByteString y)
Parameters
Type Name Description
BigtableByteString x

Left value to compare

BigtableByteString y

Right value to compare

Returns
Type Description
System.Boolean

true if x is greater than y; otherwise false.

GreaterThanOrEqual(BigtableByteString, BigtableByteString)

Operator overload to compare two BigtableByteString values.

Declaration
public static bool operator >=(BigtableByteString x, BigtableByteString y)
Parameters
Type Name Description
BigtableByteString x

Left value to compare

BigtableByteString y

Right value to compare

Returns
Type Description
System.Boolean

true if x is greater than or equal y; otherwise false.

Implicit(ByteString to BigtableByteString)

Converts a byte string to a BigtableByteString value.

Declaration
public static implicit operator BigtableByteString(ByteString value)
Parameters
Type Name Description
ByteString value

The byte string making up the value. May be null in which case the empty byte string is used.

Returns
Type Description
BigtableByteString

Implicit(Byte[] to BigtableByteString)

Converts a byte array to a BigtableByteString value.

Declaration
public static implicit operator BigtableByteString(byte[] value)
Parameters
Type Name Description
System.Byte[] value

The bytes making up the byte string. May be null in which case the empty byte string is used.

Returns
Type Description
BigtableByteString

Implicit(Int64 to BigtableByteString)

Converts the big-endian encoding of a signed 64-bit value to a BigtableByteString value.

Declaration
public static implicit operator BigtableByteString(long value)
Parameters
Type Name Description
System.Int64 value

The 64-bit value which should be used to initialize the byte string.

Returns
Type Description
BigtableByteString

Implicit(String to BigtableByteString)

Converts the UTF-8 encoding of a string to a BigtableByteString value.

Declaration
public static implicit operator BigtableByteString(string valueAsUtf8)
Parameters
Type Name Description
System.String valueAsUtf8

The value whose UTF-8 representation should be used to initialize the byte string. May be null in which case the empty byte string is used.

Returns
Type Description
BigtableByteString

Inequality(BigtableByteString, BigtableByteString)

Operator overload to compare two BigtableByteString values for inequality.

Declaration
public static bool operator !=(BigtableByteString x, BigtableByteString y)
Parameters
Type Name Description
BigtableByteString x

Left value to compare

BigtableByteString y

Right value to compare

Returns
Type Description
System.Boolean

true if x is not equal to y; otherwise false.

LessThan(BigtableByteString, BigtableByteString)

Operator overload to compare two BigtableByteString values.

Declaration
public static bool operator <(BigtableByteString x, BigtableByteString y)
Parameters
Type Name Description
BigtableByteString x

Left value to compare

BigtableByteString y

Right value to compare

Returns
Type Description
System.Boolean

true if x is less than y; otherwise false.

LessThanOrEqual(BigtableByteString, BigtableByteString)

Operator overload to compare two BigtableByteString values.

Declaration
public static bool operator <=(BigtableByteString x, BigtableByteString y)
Parameters
Type Name Description
BigtableByteString x

Left value to compare

BigtableByteString y

Right value to compare

Returns
Type Description
System.Boolean

true if x is less than or equal y; otherwise false.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator
Implements
System.Collections.IEnumerable.GetEnumerator()
Back to top