- Common ways to obtain ParameterList
private void myMethod () {ParameterList p =
ParameterBlockJAI pb;Object roi;pb.setParameter("roi", roi)
ParameterBlockJAI pb;String str;pb.setParameter(str, destinationNoData)
ParameterBlockJAI pb;String str;pb.setParameter(str, int1)
- Smart code suggestions by Codota
}
/** Returns the positive integer value of an operation parameter. */ public int intValue() throws InvalidParameterTypeException { final String name = getName(); final Class type = getType(); try { if (type.equals(Short.class)) parameters.getShortParameter(name); if (type.equals(Byte.class)) parameters.getByteParameter(name); return parameters.getIntParameter(name); } catch (ClassCastException exception) { throw invalidType(exception); } }
/** Returns the numeric value of the coordinate operation parameter. */ public double doubleValue() throws InvalidParameterTypeException { final String name = getName(); final Class type = getType(); try { if (type.equals(Float.class)) parameters.getFloatParameter(name); if (type.equals(Long.class)) parameters.getLongParameter(name); if (type.equals(Integer.class)) parameters.getIntParameter(name); if (type.equals(Short.class)) parameters.getShortParameter(name); if (type.equals(Byte.class)) parameters.getByteParameter(name); return parameters.getDoubleParameter(name); } catch (ClassCastException exception) { throw invalidType(exception); } }
assertSame(pl, pl.setParameter("xPeriod", 2)); assertSame(pl, pl.setParameter("yPeriod", 2)); assertEquals(2, pl.getIntParameter("xPeriod")); assertEquals(2, pl.getIntParameter("yPeriod")); assertEquals( "Setting 'xPeriod' on ParameterList should have no effect on ParameterValue.",