|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| AbstractType.java | 100% | 100% | 100% | 100% |
|
||||||||||||||
| 1 | /* | |
| 2 | * Copyright 2004 Ronald Blaschke. | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.rblasch.convert.type; | |
| 17 | ||
| 18 | /** | |
| 19 | * Created by IntelliJ IDEA. | |
| 20 | * User: rb | |
| 21 | * Date: Oct 27, 2004 | |
| 22 | * Time: 10:25:46 PM | |
| 23 | * To change this template use File | Settings | File Templates. | |
| 24 | */ | |
| 25 | abstract class AbstractType implements Type { | |
| 26 | 1779156 | public boolean equals(final Object obj) { |
| 27 | 130283 | if (this == obj) return true; |
| 28 | 20 | if (!(obj instanceof Type)) return false; |
| 29 | ||
| 30 | 1648853 | final Type t = (Type)obj; |
| 31 | 1648853 | return getName().equals(t.getName()); |
| 32 | } | |
| 33 | ||
| 34 | 262681 | public int hashCode() { |
| 35 | 262681 | return getName().hashCode(); |
| 36 | } | |
| 37 | ||
| 38 | 18434 | public String toString() { |
| 39 | 18434 | return getName(); |
| 40 | } | |
| 41 | } |
|
||||||||||