1 28 29 package com.caucho.jmx.query; 30 31 import javax.management.*; 32 33 36 public class InExp extends AbstractExp implements QueryExp { 37 private ValueExp _test; 38 private ValueExp []_valueList; 39 40 43 public InExp(ValueExp test, ValueExp []valueList) 44 { 45 _test = test; 46 _valueList = valueList; 47 } 48 49 56 public boolean apply(ObjectName name) 57 throws BadStringOperationException, BadBinaryOpValueExpException, 58 BadAttributeValueExpException, InvalidApplicationException 59 { 60 ValueExp test = _test.apply(name); 61 62 for (int i = 0; i < _valueList.length; i++) { 63 if (eq(test, _valueList[i].apply(name))) 64 return true; 65 } 66 67 return false; 68 } 69 70 73 public String toString() 74 { 75 return "in(" + _test + ", " + _valueList + ")"; 76 } 77 } 78 | Popular Tags |