Stay organized with collections
Save and categorize content based on your preferences.
PatternInfo
class PatternInfo : Cloneable, Serializable
PatternInfo class saves the first and second part of interval pattern, and whether the interval pattern is earlier date first.
Summary
Public constructors |
Constructs a PatternInfo object.
|
Public methods |
Boolean |
Compares the specified object with this PatternInfo for equality.
|
Boolean |
Returns whether the first date in interval patter is later date or not.
|
String! |
Returns the first part of interval pattern.
|
String! |
Returns the second part of interval pattern.
|
Int |
Returns the hash code of this PatternInfo .
|
String |
Returns a string representation of the object.
|
Public constructors
PatternInfo
PatternInfo(
firstPart: String!,
secondPart: String!,
firstDateInPtnIsLaterDate: Boolean)
Constructs a PatternInfo
object.
Parameters |
firstPart |
String!: The first part of interval pattern. |
secondPart |
String!: The second part of interval pattern. |
firstDateInPtnIsLaterDate |
Boolean: Whether the first date in interval patter is later date or not. |
Public methods
equals
fun equals(other: Any?): Boolean
Compares the specified object with this PatternInfo
for equality.
Parameters |
obj |
the reference object with which to compare. |
a |
The object to be compared. |
Return |
Boolean |
true if the specified object is equal to this PatternInfo . |
firstDateInPtnIsLaterDate
fun firstDateInPtnIsLaterDate(): Boolean
Returns whether the first date in interval patter is later date or not.
Return |
Boolean |
Whether the first date in interval patter is later date or not. |
getFirstPart
fun getFirstPart(): String!
Returns the first part of interval pattern.
Return |
String! |
The first part of interval pattern. |
getSecondPart
fun getSecondPart(): String!
Returns the second part of interval pattern.
Return |
String! |
The second part of interval pattern. |
hashCode
fun hashCode(): Int
Returns the hash code of this PatternInfo
.
Return |
Int |
A hash code value for this object. |
toString
fun toString(): String
Returns a string representation of the object.
Return |
String |
a string representation of the object. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DateIntervalInfo.PatternInfo\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPatternInfo\n===========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/icu/text/DateIntervalInfo.PatternInfo \"View this page in Java\") \n\n```\nclass PatternInfo : Cloneable, Serializable\n```\n\n|---|----------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.icu.text.DateIntervalInfo.PatternInfo](#) |\n\nPatternInfo class saves the first and second part of interval pattern, and whether the interval pattern is earlier date first.\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [PatternInfo](#PatternInfo(kotlin.String,%20kotlin.String,%20kotlin.Boolean))`(`firstPart:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `secondPart:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `firstDateInPtnIsLaterDate:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Constructs a `PatternInfo` object. |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` Compares the specified object with this `PatternInfo` for equality. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [firstDateInPtnIsLaterDate](#firstDateInPtnIsLaterDate())`()` Returns whether the first date in interval patter is later date or not. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getFirstPart](#getFirstPart())`()` Returns the first part of interval pattern. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getSecondPart](#getSecondPart())`()` Returns the second part of interval pattern. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` Returns the hash code of this `PatternInfo`. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` Returns a string representation of the object. |\n\nPublic constructors\n-------------------\n\n### PatternInfo\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nPatternInfo(\n firstPart: String!, \n secondPart: String!, \n firstDateInPtnIsLaterDate: Boolean)\n```\n\nConstructs a `PatternInfo` object.\n\n| Parameters ||\n|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| `firstPart` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: The first part of interval pattern. |\n| `secondPart` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: The second part of interval pattern. |\n| `firstDateInPtnIsLaterDate` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): Whether the first date in interval patter is later date or not. |\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun equals(other: Any?): Boolean\n```\n\nCompares the specified object with this `PatternInfo` for equality.\n\n| Parameters ||\n|-------|---------------------------------------------|\n| `obj` | the reference object with which to compare. |\n| `a` | The object to be compared. |\n\n| Return ||\n|------------------------------------------------------------------------------------|----------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if the specified object is equal to this `PatternInfo`. |\n\n### firstDateInPtnIsLaterDate\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun firstDateInPtnIsLaterDate(): Boolean\n```\n\nReturns whether the first date in interval patter is later date or not.\n\n| Return ||\n|------------------------------------------------------------------------------------|-----------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | Whether the first date in interval patter is later date or not. |\n\n### getFirstPart\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getFirstPart(): String!\n```\n\nReturns the first part of interval pattern.\n\n| Return ||\n|-----------------------------------------------------------------------------------|-------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | The first part of interval pattern. |\n\n### getSecondPart\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getSecondPart(): String!\n```\n\nReturns the second part of interval pattern.\n\n| Return ||\n|-----------------------------------------------------------------------------------|--------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | The second part of interval pattern. |\n\n### hashCode\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hashCode(): Int\n```\n\nReturns the hash code of this `PatternInfo`.\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | A hash code value for this object. |\n\n### toString\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun toString(): String\n```\n\nReturns a string representation of the object.\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |"]]