| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| AbstractPredicate |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2011 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 1.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.opensource.org/licenses/ecl1.php | |
| 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.kuali.rice.core.api.criteria; | |
| 17 | ||
| 18 | import org.apache.commons.lang.builder.EqualsBuilder; | |
| 19 | import org.apache.commons.lang.builder.HashCodeBuilder; | |
| 20 | import org.apache.commons.lang.builder.ToStringBuilder; | |
| 21 | ||
| 22 | /** | |
| 23 | * An abstract class from which all {@link Predicate} instances should extend. | |
| 24 | * This class merely defines standard implementations for hashCode, equals, | |
| 25 | * and toString. | |
| 26 | * | |
| 27 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 28 | */ | |
| 29 | 328 | abstract class AbstractPredicate implements Predicate { |
| 30 | ||
| 31 | private static final long serialVersionUID = 7035792141358213138L; | |
| 32 | ||
| 33 | @Override | |
| 34 | public int hashCode() { | |
| 35 | 405 | return HashCodeBuilder.reflectionHashCode(this); |
| 36 | } | |
| 37 | ||
| 38 | @Override | |
| 39 | public boolean equals(Object obj) { | |
| 40 | 103 | return EqualsBuilder.reflectionEquals(obj, this); |
| 41 | } | |
| 42 | ||
| 43 | @Override | |
| 44 | public String toString() { | |
| 45 | 0 | return ToStringBuilder.reflectionToString(this); |
| 46 | } | |
| 47 | ||
| 48 | } |