# Cap

public class **Cap** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
implements [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html)

|---|---|---|
| Known Direct Subclasses [ButtCap](https://developers.google.com/android/reference/com/google/android/gms/maps/model/ButtCap), [CustomCap](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CustomCap), [RoundCap](https://developers.google.com/android/reference/com/google/android/gms/maps/model/RoundCap), [SquareCap](https://developers.google.com/android/reference/com/google/android/gms/maps/model/SquareCap) |---|---| | [ButtCap](https://developers.google.com/android/reference/com/google/android/gms/maps/model/ButtCap) | Cap that is squared off exactly at the start or end vertex of a `https://developers.google.com/android/reference/com/google/android/gms/maps/model/Polyline` with solid stroke pattern, equivalent to having no additional cap beyond the start or end vertex. | | [CustomCap](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CustomCap) | Bitmap overlay centered at the start or end vertex of a `https://developers.google.com/android/reference/com/google/android/gms/maps/model/Polyline`, orientated according to the direction of the line's first or last edge and scaled with respect to the line's stroke width. | | [RoundCap](https://developers.google.com/android/reference/com/google/android/gms/maps/model/RoundCap) | Cap that is a semicircle with radius equal to half the stroke width, centered at the start or end vertex of a `https://developers.google.com/android/reference/com/google/android/gms/maps/model/Polyline` with solid stroke pattern. | | [SquareCap](https://developers.google.com/android/reference/com/google/android/gms/maps/model/SquareCap) | Cap that is squared off after extending half the stroke width beyond the start or end vertex of a `https://developers.google.com/android/reference/com/google/android/gms/maps/model/Polyline` with solid stroke pattern. | |||

Immutable cap that can be applied at the start or end vertex of a `https://developers.google.com/android/reference/com/google/android/gms/maps/model/Polyline`.

### Inherited Constant Summary

From interface android.os.Parcelable

|---|---|---|
| int | CONTENTS_FILE_DESCRIPTOR |   |
| int | PARCELABLE_WRITE_RETURN_VALUE |   |

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/android/reference/com/google/android/gms/maps/model/Cap#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) o) |
| int | [hashCode](https://developers.google.com/android/reference/com/google/android/gms/maps/model/Cap#hashCode())() |
| [String](https://developer.android.com/reference/java/lang/String.html) | [toString](https://developers.google.com/android/reference/com/google/android/gms/maps/model/Cap#toString())() |
| void | [writeToParcel](https://developers.google.com/android/reference/com/google/android/gms/maps/model/Cap#writeToParcel(android.os.Parcel,%20int))([Parcel](https://developer.android.com/reference/android/os/Parcel.html) out, int flags) |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface android.os.Parcelable

|---|---|
| abstract int | describeContents() |
| abstract void | writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |

## Public Methods

#### public boolean **equals** ([Object](https://developer.android.com/reference/java/lang/Object.html) o)

#### public int **hashCode** ()

#### public [String](https://developer.android.com/reference/java/lang/String.html) **toString** ()

#### public void **writeToParcel** ([Parcel](https://developer.android.com/reference/android/os/Parcel.html) out, int flags)