all files / src/utils/ parser-values.utils.ts

61.54% Statements 8/13
100% Branches 0/0
14.29% Functions 1/7
58.33% Lines 7/12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64                      1×                     1×                 1×                 1×                 1×                 1×       1×  
/*********************************************************************************************************************************
 This class has been automatically generated using KLTT-APIRestGenerator project, don't do manual file modifications.
 Fri Jul 13 17:25:44 CEST 2018
 
 "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements;
  and to You under the Apache License, Version 2.0. "
**********************************************************************************************************************************/
 
/**
 * This class contains the common methods for parsing the income results
 */
export class ParserValues
{
    /**
	 * Public constructor
	 */
	constructor() { }
	
	/**
	 * @param stringValue with the string value
	 * @return a boolean
	 */
	static booleanParser(stringValue)
	{
		return (stringValue === true) ;
	}
	
	/**
	 * @param stringValue with the string value
	 * @return a number
	 */
	static numberParser(stringValue)
	{
		return parseInt(stringValue) ;
	}
	
	/**
	 * @param stringValue with the string value
	 * @return a float
	 */
	static floatParser(stringValue)
	{
		return parseFloat(stringValue) ;
	}
	
	/**
	 * @param stringValue with the string value
	 * @return a string
	 */
	static stringParser(stringValue)
	{
		return String(stringValue) ;
	}
	
	/**
	 * @param fileValue with the file value
	 * @return a float
	 */
	static fileParser(fileValue)
	{
		return fileValue ;
	}
};