1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.kuali.mobility.academics.util;
16
17 import org.apache.commons.collections.Predicate;
18 import org.kuali.mobility.academics.entity.CatalogNumber;
19
20
21
22
23
24 public class CatalogNumberPredicate implements Predicate {
25 private String catalogNumber;
26 public CatalogNumberPredicate(String catalogNumber) {
27 super();
28 this.catalogNumber = catalogNumber;
29 }
30
31 @Override
32 public boolean evaluate( Object obj ) {
33 boolean match = false;
34 if( obj instanceof CatalogNumber ) {
35 if( catalogNumber != null && catalogNumber.equalsIgnoreCase( ((CatalogNumber)obj).getNumber() )) {
36 match = true;
37 }
38 }
39 return match;
40 }
41 }