DiscreteAttribute extends AbstractIndexableAttribute implements RangeAttribute { @Override public Object getMax() { return values.isEmpty() ? null : values.max(); } DiscreteAttribute(String key, AttributeLevel level); @Override int registerXAttribute(XAttribute att); @Override ImmutableList<Object> getValues(); @Override int getValueIndex(Object value); @Override Object getValue(int index); @Override int getValueSize(); @Override Object getMin(); @Override Object getMax();  }
@Test public void testGetMax() { DiscreteAttribute att0 = this.newEmptyAttribute("concept:name", AttributeLevel.EVENT); Assert.assertEquals(null, att0.getMax()); DiscreteAttribute att1 = this.newWithOneValue("concept:name", AttributeLevel.EVENT); Assert.assertEquals((long)100, att1.getMax()); DiscreteAttribute att2 = this.newWithTwoValues("concept:name", AttributeLevel.EVENT); Assert.assertEquals((long)200, att2.getMax()); }