Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#pubctors) \| [Methods](https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#inhmethods)

# DateIntervalInfo.PatternInfo

*** ** * ** ***


`
public
static
final

class
DateIntervalInfo.PatternInfo
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/java/lang/Cloneable,

https://developer.android.com/reference/java/io/Serializable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.icu.text.DateIntervalInfo.PatternInfo |

<br />

*** ** * ** ***

PatternInfo class saves the first and second part of interval pattern,
and whether the interval pattern is earlier date first.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#PatternInfo(java.lang.String,%20java.lang.String,%20boolean)(https://developer.android.com/reference/java/lang/String firstPart, https://developer.android.com/reference/java/lang/String secondPart, boolean firstDateInPtnIsLaterDate) ` Constructs a `PatternInfo` object. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object a) ` Compares the specified object with this `PatternInfo` for equality. |
| ` boolean` | ` https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#firstDateInPtnIsLaterDate()() ` Returns whether the first date in interval patter is later date or not. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#getFirstPart()() ` Returns the first part of interval pattern. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#getSecondPart()() ` Returns the second part of interval pattern. |
| ` int` | ` https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#hashCode()() ` Returns the hash code of this `PatternInfo`. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/icu/text/DateIntervalInfo.PatternInfo#toString()() ` Returns a string representation of the object. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public constructors

### PatternInfo

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PatternInfo (String firstPart, 
                String secondPart, 
                boolean firstDateInPtnIsLaterDate)
```

Constructs a `PatternInfo` object.

<br />

| Parameters ||
|---|---|
| `firstPart` | `String`: The first part of interval pattern. <br /> |
| `secondPart` | `String`: The second part of interval pattern. <br /> |
| `firstDateInPtnIsLaterDate` | `boolean`: Whether the first date in interval patter is later date or not. <br /> |

## Public methods

### equals

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object a)
```

Compares the specified object with this `PatternInfo` for equality.

<br />

| Parameters ||
|---|---|
| `a` | `Object`: The object to be compared. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the specified object is equal to this `PatternInfo`. <br /> |

### firstDateInPtnIsLaterDate

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean firstDateInPtnIsLaterDate ()
```

Returns whether the first date in interval patter is later date or not.

<br />

| Returns ||
|---|---|
| `boolean` | Whether the first date in interval patter is later date or not. <br /> |

### getFirstPart

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getFirstPart ()
```

Returns the first part of interval pattern.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The first part of interval pattern. <br /> |

### getSecondPart

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getSecondPart ()
```

Returns the second part of interval pattern.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The second part of interval pattern. <br /> |

### hashCode

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns the hash code of this `PatternInfo`.

<br />

| Returns ||
|---|---|
| `int` | A hash code value for this object. <br /> |

### toString

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |