1 28 29 package com.caucho.jmx.query; 30 31 import javax.management.*; 32 33 36 public class FinalSubStringExp extends AbstractExp implements QueryExp { 37 private AttributeValueExp _v1; 38 private StringValueExp _v2; 39 40 43 public FinalSubStringExp(AttributeValueExp v1, StringValueExp v2) 44 { 45 _v1 = v1; 46 _v2 = v2; 47 } 48 49 56 public boolean apply(ObjectName name) 57 throws BadStringOperationException, BadBinaryOpValueExpException, 58 BadAttributeValueExpException, InvalidApplicationException 59 { 60 ValueExp v1 = _v1.apply(name); 61 ValueExp v2 = _v2.apply(name); 62 63 return toString(v1).endsWith(toString(v2)); 64 } 65 66 69 public String toString() 70 { 71 return "" + _v1 + ".endsWith(" + _v2 + ")"; 72 } 73 } 74 | Popular Tags |