Dash
Stay organized with collections
Save and categorize content based on your preferences.
outlined_flag
Dash is an immutable class in the Maps SDK for Android used to define dashes in stroke patterns for Polyline, Polygon, or Circle outlines.
It inherits from PatternItem and is defined by a single field length representing the dash length in pixels.
You can construct a Dash instance by providing the desired length in pixels.
The length is automatically clamped to zero if a negative value is provided during construction.
An immutable class representing a dash used in the stroke pattern for a Polyline or the
outline of a Polygon or Circle .
Inherited Constant Summary
From interface
android.os.Parcelable
int
CONTENTS_FILE_DESCRIPTOR
int
PARCELABLE_WRITE_RETURN_VALUE
Field Summary
public
final
float
length
Length in pixels (non-negative).
Public Constructor Summary
Dash (float length)
Constructs a Dash.
Inherited Method Summary
From class
java.lang.Object
boolean
equals (Object arg0)
final
Class<?>
getClass ()
int
hashCode ()
final
void
notify ()
final
void
notifyAll ()
String
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 arg0, int arg1)
Fields
public
final
float
length
Length in pixels (non-negative).
Public Constructors
public
Dash
(float length)
Parameters
length
Length in pixels. Negative value will be clamped to zero.
Public Methods
public
String
toString
()
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 2026-11-09 UTC.
[null,null,["Last updated 2026-11-09 UTC."],[],["`Dash` is an immutable class representing a dash in stroke patterns for `Polyline`, `Polygon`, or `Circle` outlines. It extends `PatternItem` and implements `Parcelable`. Key actions include constructing a `Dash` object with a specified non-negative pixel `length`, which defaults to zero if a negative value is provided. It has a `toString` method and inherits several methods like `equals`, `hashCode`, and `describeContents` from parent classes and interfaces. The `length` field is the only configurable property.\n"]]