为什么Apache Commons库验证器可序列化?

时间:2019-02-02 06:55:46

标签: java serialization apache-commons

我正在仔细检查源代码Apache Commons库。我的问题是为什么他们对每个验证器类都使用var pattern = /(\d{2})\-(\d{2})\-(\d{4})\s(\d{2}):(\d{2}):(\d{2})/; this.fetchedData.sort(function compare(a, b) { var dateA = +new Date(a.date.replace(pattern,'$3-$2-$1T$4:$5:$6')); var dateB = +new Date(b.date.replace(pattern,'$3-$2-$1T$4:$5:$6')); return dateB - dateA; }); ,例如EmailValidatoreISBNValidator类?

它使我对Serializable用例感到困惑。有人可以在这里证明Serializable的用例吗?

0 个答案:

没有答案