public class IntegerAttribute extends AbstractElementAttribute<Integer>
| Modifier | Constructor and Description |
|---|---|
|
IntegerAttribute(String name)
Construtor para atributos obrigatórios.
|
protected |
IntegerAttribute(String name,
boolean isOptional,
Integer defaultValue,
IntegerAttribute defaultValueAttribute,
Integer minimumValue,
IntegerAttribute minimumValueAttribute,
Integer maximumValue,
IntegerAttribute maximumValueAttribute)
Construtor.
|
|
IntegerAttribute(String name,
Integer defaultValue)
Construtor para atributos opcionais.
|
|
IntegerAttribute(String name,
Integer minimumValue,
Integer maximumValue)
Construtor para atributos obrigatórios.
|
|
IntegerAttribute(String name,
Integer defaultValue,
Integer minimumValue,
Integer maximumValue)
Construtor para atributos opcionais.
|
| Modifier and Type | Method and Description |
|---|---|
StringToValueConverter<Integer> |
getValueConverter()
Conversor de valor do atributo para string.
|
void |
setMaximumValue(Integer maximumValue)
Atribui o valor máximo do atributo.
|
void |
setMaximumValueAttribute(IntegerAttribute maximumValueAttribute)
Define o atributo que determina o valor máximo deste atributo.
|
void |
setMinimumValue(Integer minimumValue)
Atribui o valor mínimo do atributo.
|
void |
setMinimumValueAttribute(IntegerAttribute minimumValueAttribute)
Define o atributo que determina o valor mínimo deste atributo.
|
boolean |
validate(ParsedElement definition)
Valida o atributo de acordo com o elemento lido.
|
getDefaultValue, getDefaultValueAttribute, getName, getType, isOptional, setDefaultValueAttributeprotected IntegerAttribute(String name, boolean isOptional, Integer defaultValue, IntegerAttribute defaultValueAttribute, Integer minimumValue, IntegerAttribute minimumValueAttribute, Integer maximumValue, IntegerAttribute maximumValueAttribute)
name - nome do atributo.isOptional - indicativo de opcionalidade.defaultValue - valor padrão do atributo.defaultValueAttribute - atributo com valor padrão.minimumValue - valor mínimo do atributo.minimumValueAttribute - atributo que define o valor mínimo deste
atributo.maximumValue - valor máximo do atributo.maximumValueAttribute - atributo que define o valor máximo deste
atributo.public IntegerAttribute(String name, Integer defaultValue, Integer minimumValue, Integer maximumValue)
name - nome do atributo.defaultValue - valor padrão do atributo.minimumValue - valor mínimo do atributo.maximumValue - valor máximo do atributo.public IntegerAttribute(String name, Integer defaultValue)
name - nome do atributo.defaultValue - valor padrão do atributo.public IntegerAttribute(String name, Integer minimumValue, Integer maximumValue)
name - nome do atributo.minimumValue - valor mínimo do atributo.maximumValue - valor máximo do atributo.public IntegerAttribute(String name)
name - nome do atributo.public void setMinimumValue(Integer minimumValue)
minimumValue - o valor mínimo.public void setMaximumValue(Integer maximumValue)
maximumValue - o valor máximo.public void setMaximumValueAttribute(IntegerAttribute maximumValueAttribute)
maximumValueAttribute - o valor máximo.public void setMinimumValueAttribute(IntegerAttribute minimumValueAttribute)
minimumValueAttribute - o valor mínimo.public boolean validate(ParsedElement definition) throws ParseException
validate in interface IElementAttribute<Integer>validate in class AbstractElementAttribute<Integer>definition - o elemento.ParseException - em caso de erro de leitura do XML.public StringToValueConverter<Integer> getValueConverter()
Copyright © 2018. All rights reserved.