Android 12 Developer Preview is here! Try it out, and give us your feedback!

Metadata

public class Metadata
extends Object

java.lang.Object
   ↳ com.google.android.libraries.car.app.model.Metadata


A metadata class used for attaching additional properties to models.

Summary

Nested classes

class Metadata.Builder

A builder for Metadata

Fields

public static final Metadata EMPTY_METADATA

An empty Metadata instance.

Public methods

static Metadata.Builder builder()

Constructs a new builder of a Metadata instance.

boolean equals(Object other)
int hashCode()
Metadata.Builder newBuilder()

Returns a new Metadata.Builder with the data from this Metadata instance.

static Metadata ofPlace(Place place)

Constructs a new instance of Metadata containing a Place.

Inherited methods

Fields

EMPTY_METADATA

public static final Metadata EMPTY_METADATA

An empty Metadata instance.

Public methods

builder

public static Metadata.Builder builder ()

Constructs a new builder of a Metadata instance.

Returns
Metadata.Builder

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

hashCode

public int hashCode ()

Returns
int

newBuilder

public Metadata.Builder newBuilder ()

Returns a new Metadata.Builder with the data from this Metadata instance.

Returns
Metadata.Builder

ofPlace

public static Metadata ofPlace (Place place)

Constructs a new instance of Metadata containing a Place.

Parameters
place Place

Returns
Metadata

Throws
NullPointerException if place is null.