# Class SubsetView (2.79.0)

2.79.0 (latest) 2.78.1 2.77.0 2.74.0 2.73.0 2.72.0 2.71.0 2.70.0 2.68.0 2.67.1 2.66.0 2.65.1 2.63.0 2.62.0 2.61.0 2.60.0 2.59.0 2.58.2 2.56.0 2.54.0 2.52.0 2.51.2 2.49.0 2.46.0 2.45.1 2.44.1 2.43.0 2.42.0 2.40.0 2.39.5 2.37.0 2.35.1 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.1 2.28.0

    public class SubsetView implements AuthorizedView.AuthorizedViewType

Defines a simple authorized view that is a subset of the underlying Table.

Users can specify the rows in the form of row key prefixes, and specify the column families by
adding the family id along with its familySubsets rule to the family subsets map. The subset is
defined by the intersection of the specified row key prefixes and column family subsets.

## Inheritance

[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> SubsetView

## Implements

[AuthorizedView.AuthorizedViewType](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.admin.v2.models.AuthorizedView.AuthorizedViewType)

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### create()

    public static SubsetView create()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.admin.v2.models.SubsetView` |   |

### fromProto(AuthorizedView.SubsetView proto)

    public static SubsetView fromProto(AuthorizedView.SubsetView proto)

> [!WARNING]
> **Internal Only**: This feature is not stable for application use.

Wraps the protobuf. This method is considered an internal implementation detail and not meant
to be used by applications.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `proto` | `com.google.bigtable.admin.v2.AuthorizedView.SubsetView` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.admin.v2.models.SubsetView` |   |

## Methods

### addRowPrefix(ByteString rowPrefix)

    public SubsetView addRowPrefix(ByteString rowPrefix)

Adds a new rowPrefix to the subset view.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `rowPrefix` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.admin.v2.models.SubsetView` |   |

### addRowPrefix(String rowPrefix)

    public SubsetView addRowPrefix(String rowPrefix)

Adds a new rowPrefix to the subset view.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `rowPrefix` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.admin.v2.models.SubsetView` |   |

### equals(Object o)

    public boolean equals(Object o)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `o` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-)

### getFamilySubsets()

    public Map<String,FamilySubsets> getFamilySubsets()

Gets the map from familyId to familySubsets in this subset view.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.admin.v2.models.FamilySubsets>` |   |

### getRowPrefixes()

    public List<ByteString> getRowPrefixes()

Gets the row prefixes to be included in this subset view.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html>` |   |

### hashCode()

    public int hashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--)

### setFamilySubsets(String familyId, FamilySubsets familySubsets)

    public SubsetView setFamilySubsets(String familyId, FamilySubsets familySubsets)

Adds a new familyId with its familySubsets to the subset view. Please note that calling this
method with the same familyId will overwrite the previous rule set on the family.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `familyId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `familySubsets` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.admin.v2.models.FamilySubsets` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.admin.v2.models.SubsetView` |   |

### toProto()

    public AuthorizedView.SubsetView toProto()

> [!WARNING]
> **Internal Only**: This feature is not stable for application use.

Creates the request protobuf. This method is considered an internal implementation detail and
not meant to be used by applications.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.bigtable.admin.v2.AuthorizedView.SubsetView` |   |