Package es.gob.afirma.tsl.elements.json
Class DateString
- java.lang.Object
-
- es.gob.afirma.tsl.elements.json.DateString
-
- All Implemented Interfaces:
java.io.Serializable
public class DateString extends java.lang.Object implements java.io.SerializableClass that represents an element transformation between a Date and a string in a specific format: "yyyy-MM-dd\'T\'HH:mm:ss.SSSXXX".
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.0, 10/10/2020.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DateString(java.lang.String dateStringParam)Constructor method for the class DateString.java.DateString(java.util.Date dateParam)Constructor method for the class DateString.java.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.DategetDate()Gets the value of the attributedate.java.lang.StringgetDateString()Gets the value of the attributedateString.java.lang.StringtoString()
-
-
-
Constructor Detail
-
DateString
public DateString(java.util.Date dateParam)
Constructor method for the class DateString.java.- Parameters:
dateParam- Date to set.
-
DateString
public DateString(java.lang.String dateStringParam)
Constructor method for the class DateString.java.- Parameters:
dateStringParam- Date to set in string format.
-
-
Method Detail
-
getDate
public final java.util.Date getDate() throws java.text.ParseExceptionGets the value of the attributedate.- Returns:
- the value of the attribute
date. - Throws:
java.text.ParseException- In case of some error parsing the input date string.
-
getDateString
public final java.lang.String getDateString()
Gets the value of the attributedateString.- Returns:
- the value of the attribute
dateString.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-