Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 1 | <html><body><pre>
|
| 2 | /*
|
| 3 | * Licensed to the Apache Software Foundation (ASF) under one or more
|
| 4 | * contributor license agreements. See the NOTICE file distributed with
|
| 5 | * this work for additional information regarding copyright ownership.
|
| 6 | * The ASF licenses this file to You under the Apache License, Version 2.0
|
| 7 | * (the "License"); you may not use this file except in compliance with
|
| 8 | * the License. You may obtain a copy of the License at
|
| 9 | *
|
| 10 | * http://www.apache.org/licenses/LICENSE-2.0
|
| 11 | *
|
| 12 | * Unless required by applicable law or agreed to in writing, software
|
| 13 | * distributed under the License is distributed on an "AS IS" BASIS,
|
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 15 | * See the License for the specific language governing permissions and
|
| 16 | * limitations under the License.
|
| 17 | */
|
| 18 |
|
| 19 | package cal;
|
| 20 |
|
| 21 | public class Entry {
|
| 22 |
|
| 23 | String hour;
|
| 24 | String description;
|
| 25 | String color;
|
| 26 |
|
| 27 | public Entry (String hour) {
|
| 28 | this.hour = hour;
|
| 29 | this.description = "";
|
| 30 |
|
| 31 | }
|
| 32 |
|
| 33 | public String getHour () {
|
| 34 | return this.hour;
|
| 35 | }
|
| 36 |
|
| 37 | public String getColor () {
|
| 38 | if (description.equals("")) return "lightblue";
|
| 39 | else return "red";
|
| 40 | }
|
| 41 |
|
| 42 | public String getDescription () {
|
| 43 | if (description.equals("")) return "None";
|
| 44 | else return this.description;
|
| 45 | }
|
| 46 |
|
| 47 | public void setDescription (String descr) {
|
| 48 | description = descr;
|
| 49 | }
|
| 50 |
|
| 51 | }
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 | </pre></body></html>
|