Google is committed to advancing racial equity for Black communities. See how.

CompositeDateValidator

public final class CompositeDateValidator
extends Object implements CalendarConstraints.DateValidator

java.lang.Object
   ↳ com.google.android.material.datepicker.CompositeDateValidator


A CalendarConstraints.DateValidator that accepts a list of Date Validators.

Summary

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<CompositeDateValidator> CREATOR

Part of Parcelable requirements.

Public methods

static CalendarConstraints.DateValidator allOf(List<CalendarConstraints.DateValidator> validators)

Returns a CalendarConstraints.DateValidator that can perform validation for every given validator.

int describeContents()
boolean equals(Object o)
int hashCode()
boolean isValid(long date)

Performs the isValid(long) check as an AND of all validators.

void writeToParcel(Parcel dest, int flags)

Inherited methods

From class java.lang.Object
From interface com.google.android.material.datepicker.CalendarConstraints.DateValidator
From interface android.os.Parcelable

Fields

CREATOR

Creator<CompositeDateValidator> CREATOR

Part of Parcelable requirements. Do not use.

Public methods

allOf

CalendarConstraints.DateValidator allOf (List<CalendarConstraints.DateValidator> validators)

Returns a CalendarConstraints.DateValidator that can perform validation for every given validator.

Parameters
validators List

Returns
CalendarConstraints.DateValidator

describeContents

int describeContents ()

Returns
int

equals

boolean equals (Object o)

Parameters
o Object

Returns
boolean

hashCode

int hashCode ()

Returns
int

isValid

boolean isValid (long date)

Performs the isValid(long) check as an AND of all validators. e.g. If every validator in this class returns `true` for each isValid(long), this this method will return true.

Parameters
date long: milliseconds date to validate against.

Returns
boolean True, if the given date is valid for every given validator in this class.

writeToParcel

void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int