1 51 package org.apache.fop.fo.expr; 52 53 import org.apache.fop.fo.Property; 54 55 public class NearestSpecPropFunction extends FunctionBase { 56 57 public int nbArgs() { 58 return 1; 59 } 60 61 public Property eval(Property[] args, 62 PropertyInfo pInfo) throws PropertyException { 63 String propName = args[0].getString(); 64 if (propName == null) { 65 throw new PropertyException("Incorrect parameter to from-nearest-specified-value function"); 66 } 67 return pInfo.getPropertyList().getNearestSpecified(propName); 70 } 71 72 } 73 | Popular Tags |