Send feedback
Class Vector (0.1.0)
Stay organized with collections
Save and categorize content based on your preferences.
public final class Vector extends GeneratedMessageV3 implements VectorOrBuilder
A vector which can be either dense or sparse.
Protobuf type google.cloud.vectorsearch.v1beta.Vector
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
DENSE_FIELD_NUMBER
public static final int DENSE_FIELD_NUMBER
Field Value
Type
Description
int
SPARSE_FIELD_NUMBER
public static final int SPARSE_FIELD_NUMBER
Field Value
Type
Description
int
VALUES_FIELD_NUMBER
public static final int VALUES_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static Vector getDefaultInstance ()
Returns
Type
Description
Vector
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static Vector . Builder newBuilder ()
newBuilder(Vector prototype)
public static Vector . Builder newBuilder ( Vector prototype )
Parameter
Name
Description
prototype
Vector
public static Vector parseDelimitedFrom ( InputStream input )
Returns
Type
Description
Vector
public static Vector parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Vector
parseFrom(byte[] data)
public static Vector parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
Returns
Type
Description
Vector
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Vector parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Vector
parseFrom(ByteString data)
public static Vector parseFrom ( ByteString data )
Returns
Type
Description
Vector
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Vector parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Vector
public static Vector parseFrom ( CodedInputStream input )
Returns
Type
Description
Vector
public static Vector parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Vector
public static Vector parseFrom ( InputStream input )
Returns
Type
Description
Vector
public static Vector parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Vector
parseFrom(ByteBuffer data)
public static Vector parseFrom ( ByteBuffer data )
Returns
Type
Description
Vector
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Vector parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Vector
parser()
public static Parser<Vector> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getDefaultInstanceForType()
public Vector getDefaultInstanceForType ()
Returns
Type
Description
Vector
getDense()
public DenseVector getDense ()
A dense vector.
.google.cloud.vectorsearch.v1beta.DenseVector dense = 2;
getDenseOrBuilder()
public DenseVectorOrBuilder getDenseOrBuilder ()
A dense vector.
.google.cloud.vectorsearch.v1beta.DenseVector dense = 2;
getParserForType()
public Parser<Vector> getParserForType ()
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
getSparse()
public SparseVector getSparse ()
A sparse vector.
.google.cloud.vectorsearch.v1beta.SparseVector sparse = 3;
getSparseOrBuilder()
public SparseVectorOrBuilder getSparseOrBuilder ()
A sparse vector.
.google.cloud.vectorsearch.v1beta.SparseVector sparse = 3;
getValues(int index) (deprecated)
public float getValues ( int index )
Deprecated. google.cloud.vectorsearch.v1beta.Vector.values is deprecated. See
google/cloud/vectorsearch/v1beta/data_object.proto;l=75
The values of the vector.
repeated float values = 1 [deprecated = true];
Parameter
Name
Description
index
int The index of the element to return.
Returns
Type
Description
float
The values at the given index.
getValuesCount() (deprecated)
public int getValuesCount ()
Deprecated. google.cloud.vectorsearch.v1beta.Vector.values is deprecated. See
google/cloud/vectorsearch/v1beta/data_object.proto;l=75
The values of the vector.
repeated float values = 1 [deprecated = true];
Returns
Type
Description
int
The count of values.
getValuesList() (deprecated)
public List<Float> getValuesList ()
Deprecated. google.cloud.vectorsearch.v1beta.Vector.values is deprecated. See
google/cloud/vectorsearch/v1beta/data_object.proto;l=75
The values of the vector.
repeated float values = 1 [deprecated = true];
Returns
Type
Description
List <Float >
A list containing the values.
getVectorTypeCase()
public Vector . VectorTypeCase getVectorTypeCase ()
hasDense()
public boolean hasDense ()
A dense vector.
.google.cloud.vectorsearch.v1beta.DenseVector dense = 2;
Returns
Type
Description
boolean
Whether the dense field is set.
hasSparse()
public boolean hasSparse ()
A sparse vector.
.google.cloud.vectorsearch.v1beta.SparseVector sparse = 3;
Returns
Type
Description
boolean
Whether the sparse field is set.
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public Vector . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Vector . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public Vector . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-19 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-11-19 UTC."],[],[]]