Class IntegerTextHandler
- java.lang.Object
-
- net.ssehub.easy.producer.ui.confModel.IntegerTextHandler
-
- All Implemented Interfaces:
IGUITextHandler
public class IntegerTextHandler extends java.lang.Object implements IGUITextHandler
Class to handle and format Set of Integers in the Editor.- Author:
- Dennis Konoppa
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringrangeSeparatorSeparator for a range of integers.private static java.lang.StringseparatorSeparator for single integers.
-
Constructor Summary
Constructors Constructor Description IntegerTextHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcreateTextAreaNumbers(java.util.ArrayList<java.lang.Integer> numbers)Method to create format of lists of numbers in the Editor.java.lang.Stringformat(java.lang.String text)Method to create the format for a text.java.util.List<java.lang.Object>split(java.lang.String format)Method to generate List of Objects from a given format.
-
-
-
Method Detail
-
format
public java.lang.String format(java.lang.String text) throws java.lang.NumberFormatExceptionDescription copied from interface:IGUITextHandlerMethod to create the format for a text.- Specified by:
formatin interfaceIGUITextHandler- Parameters:
text- the text- Returns:
- formats which is fitting for the text
- Throws:
java.lang.NumberFormatException
-
split
public java.util.List<java.lang.Object> split(java.lang.String format) throws java.lang.NumberFormatExceptionDescription copied from interface:IGUITextHandlerMethod to generate List of Objects from a given format.- Specified by:
splitin interfaceIGUITextHandler- Parameters:
format- the format which contains values of the Machine- Returns:
- List of Objects which contains valid values for the Machine
- Throws:
java.lang.NumberFormatException
-
createTextAreaNumbers
public java.lang.String createTextAreaNumbers(java.util.ArrayList<java.lang.Integer> numbers)
Method to create format of lists of numbers in the Editor.- Parameters:
numbers- - List of numbers- Returns:
- String with correct format for Editor
-
-