OutlierSpec implements Cloneable, InformationSetSerializable { public void setCriticalValue(double value) { if (value != 0 && value < 2) { throw new TramoException("Critical value should be not be smaller than 2.0"); } cv_ = value; } OutlierSpec(); static void fillDictionary(String prefix, Map<String, Class> dic); void reset(); @Override OutlierSpec clone(); OutlierType[] getTypes(); void setTypes(OutlierType[] types); void clearTypes(); boolean contains(OutlierType type); void add(OutlierType type); void addRange(Collection<OutlierType> types); double getDeltaTC(); void setDeltaTC(double value); double getCriticalValue(); void setCriticalValue(double value); TsPeriodSelector getSpan(); void setSpan(TsPeriodSelector value); boolean isEML(); void setEML(boolean value); int getAIO(); void setAIO(int value); boolean isDefault(); boolean isUsed(); @Override boolean equals(Object obj); @Override int hashCode(); void remove(OutlierType outlierType); @Override InformationSet write(boolean verbose); @Override boolean read(InformationSet info); static final String SPAN; static final double DEF_DELTATC; static final boolean DEF_EML; }
@Test(expected = TramoException.class) public void testSetCriticalValueLowerBound() { OutlierSpec spec = new OutlierSpec(); spec.setCriticalValue(1.9); }
@Test(expected = TramoException.class) public void testSetDeltaTCLowerBound() { OutlierSpec spec = new OutlierSpec(); spec.setCriticalValue(.2); }
@Test(expected = TramoException.class) public void testSetDeltaUpperBound() { OutlierSpec spec = new OutlierSpec(); spec.setCriticalValue(1.0); }