OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.content.browser.input; | 5 package org.chromium.ui.picker; |
6 | 6 |
7 /** | 7 /** |
8 * Date/time suggestion container used to store information for each suggestion
that will be shown | 8 * Date/time suggestion container used to store information for each suggestion
that will be shown |
9 * in the suggestion list dialog. Keep in sync with date_time_suggestion.h. | 9 * in the suggestion list dialog. Keep in sync with date_time_suggestion.h. |
10 */ | 10 */ |
11 class DateTimeSuggestion { | 11 public class DateTimeSuggestion { |
12 private final double mValue; | 12 private final double mValue; |
13 private final String mLocalizedValue; | 13 private final String mLocalizedValue; |
14 private final String mLabel; | 14 private final String mLabel; |
15 | 15 |
16 /** | 16 /** |
17 * Constructs a color suggestion container. | 17 * Constructs a color suggestion container. |
18 * @param value The suggested date/time value. | 18 * @param value The suggested date/time value. |
19 * @param localizedValue The suggested value localized. | 19 * @param localizedValue The suggested value localized. |
20 * @param label The label for the suggestion. | 20 * @param label The label for the suggestion. |
21 */ | 21 */ |
22 DateTimeSuggestion(double value, String localizedValue, String label) { | 22 public DateTimeSuggestion(double value, String localizedValue, String label)
{ |
23 mValue = value; | 23 mValue = value; |
24 mLocalizedValue = localizedValue; | 24 mLocalizedValue = localizedValue; |
25 mLabel = label; | 25 mLabel = label; |
26 } | 26 } |
27 | 27 |
28 double value() { | 28 double value() { |
29 return mValue; | 29 return mValue; |
30 } | 30 } |
31 | 31 |
32 String localizedValue() { | 32 String localizedValue() { |
(...skipping 17 matching lines...) Expand all Loading... |
50 | 50 |
51 @Override | 51 @Override |
52 public int hashCode() { | 52 public int hashCode() { |
53 int hash = 31; | 53 int hash = 31; |
54 hash = 37 * hash + (int) mValue; | 54 hash = 37 * hash + (int) mValue; |
55 hash = 37 * hash + mLocalizedValue.hashCode(); | 55 hash = 37 * hash + mLocalizedValue.hashCode(); |
56 hash = 37 * hash + mLabel.hashCode(); | 56 hash = 37 * hash + mLabel.hashCode(); |
57 return hash; | 57 return hash; |
58 } | 58 } |
59 } | 59 } |
OLD | NEW |