From 2900c7d92d422e156a17c021b65576bbbaeb06e7 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Sun, 16 Jul 2023 20:00:24 -0700 Subject: [PATCH] Add Javadoc for some Agora invariants --- java/daikon/inv/Joiner.java | 1 + .../inv/unary/string/FixedLengthString.java | 15 ++++++++++++- java/daikon/inv/unary/string/IsEmail.java | 21 +++++++++++++++++-- java/daikon/inv/unary/string/IsNumeric.java | 15 ++++++++++++- java/daikon/inv/unary/string/IsUrl.java | 16 +++++++++++++- .../SequenceFixedLengthString.java | 15 ++++++++++++- .../SequenceStringElementsAreEmail.java | 15 ++++++++++++- .../SequenceStringElementsAreNumeric.java | 15 ++++++++++++- .../SequenceStringElementsAreUrl.java | 15 ++++++++++++- ...SequenceStringElementsAreDateDDMMYYYY.java | 15 ++++++++++++- ...SequenceStringElementsAreDateMMDDYYYY.java | 15 ++++++++++++- ...SequenceStringElementsAreDateYYYYMMDD.java | 15 ++++++++++++- .../dates/SequenceStringElementsAreHour.java | 15 ++++++++++++- .../SequenceStringElementsAreHourAMPM.java | 15 ++++++++++++- ...uenceStringElementsAreHourWithSeconds.java | 15 ++++++++++++- ...ElementsAreTimestampYYYYMMHHThhmmssmm.java | 15 ++++++++++++- 16 files changed, 217 insertions(+), 16 deletions(-) diff --git a/java/daikon/inv/Joiner.java b/java/daikon/inv/Joiner.java index 8fed58d75a..c18d57b4b8 100644 --- a/java/daikon/inv/Joiner.java +++ b/java/daikon/inv/Joiner.java @@ -58,6 +58,7 @@ public boolean isObviousDerived() { return false; } + @Pure public @Nullable DiscardInfo isObviousImplied() { return null; } diff --git a/java/daikon/inv/unary/string/FixedLengthString.java b/java/daikon/inv/unary/string/FixedLengthString.java index 539d29f11f..a0c9451230 100644 --- a/java/daikon/inv/unary/string/FixedLengthString.java +++ b/java/daikon/inv/unary/string/FixedLengthString.java @@ -25,6 +25,7 @@ */ public class FixedLengthString extends SingleString { + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -38,17 +39,29 @@ public class FixedLengthString extends SingleString { /// /// Required methods /// + + /** + * Creates a new FixedLengthString. + * + * @param ppt the slice with the variable of interest + */ private FixedLengthString(PptSlice ppt) { super(ppt); } + /** Creates a new prototype FixedLengthString. */ private @Prototype FixedLengthString() { super(); } + /** The prototype invariant. */ private static @Prototype FixedLengthString proto = new @Prototype FixedLengthString(); - // Returns the prototype invariant + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype FixedLengthString get_proto() { return proto; } diff --git a/java/daikon/inv/unary/string/IsEmail.java b/java/daikon/inv/unary/string/IsEmail.java index bf9863bcb4..62d31c5119 100644 --- a/java/daikon/inv/unary/string/IsEmail.java +++ b/java/daikon/inv/unary/string/IsEmail.java @@ -16,6 +16,7 @@ * Email}. */ public class IsEmail extends SingleString { + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -25,22 +26,38 @@ public class IsEmail extends SingleString { private static Pattern pattern = Pattern.compile( - "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]^[0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$"); + // username + "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")" + + "@" + // domain + + "(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]^[0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$"); /// /// Required methods /// + + /** + * Creates a new IsEmail. + * + * @param ppt the slice with the variable of interest + */ private IsEmail(PptSlice ppt) { super(ppt); } + /** Creates a new prototype IsEmail. */ private @Prototype IsEmail() { super(); } + /** The prototype invariant. */ private static @Prototype IsEmail proto = new @Prototype IsEmail(); - // Returns the prototype invariant + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype IsEmail get_proto() { return proto; } diff --git a/java/daikon/inv/unary/string/IsNumeric.java b/java/daikon/inv/unary/string/IsNumeric.java index 1668c5bd59..cebd789cb3 100644 --- a/java/daikon/inv/unary/string/IsNumeric.java +++ b/java/daikon/inv/unary/string/IsNumeric.java @@ -16,6 +16,7 @@ * Numeric}. */ public class IsNumeric extends SingleString { + /** UID for serialization. */ static final long serialVersionUID = 20230704L; private static Pattern pattern = @@ -32,18 +33,30 @@ public class IsNumeric extends SingleString { /// /// Required methods /// + + /** + * Creates a new IsNumeric. + * + * @param ppt the slice with the variable of interest + */ private IsNumeric(PptSlice ppt) { super(ppt); alwaysEmpty = true; } + /** Creates a new prototype IsNumeric. */ private @Prototype IsNumeric() { super(); } + /** The prototype invariant. */ private static @Prototype IsNumeric proto = new @Prototype IsNumeric(); - // Returns the prototype invariant + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype IsNumeric get_proto() { return proto; } diff --git a/java/daikon/inv/unary/string/IsUrl.java b/java/daikon/inv/unary/string/IsUrl.java index e01f4d0804..c70a4147de 100644 --- a/java/daikon/inv/unary/string/IsUrl.java +++ b/java/daikon/inv/unary/string/IsUrl.java @@ -13,6 +13,8 @@ /** Indicates that the value of a string variable is always a URL. Prints as {@code is Url}. */ public class IsUrl extends SingleString { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -27,17 +29,29 @@ public class IsUrl extends SingleString { /// /// Required methods /// + + /** + * Creates a new IsUrl. + * + * @param ppt the slice with the variable of interest + */ private IsUrl(PptSlice ppt) { super(ppt); } + /** Creates a new prototype IsUrl. */ private @Prototype IsUrl() { super(); } + /** The prototype invariant. */ private static @Prototype IsUrl proto = new @Prototype IsUrl(); - // Returns the prototype invariant + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype IsUrl get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/SequenceFixedLengthString.java b/java/daikon/inv/unary/stringsequence/SequenceFixedLengthString.java index 3c1935abb5..c52966b9d6 100644 --- a/java/daikon/inv/unary/stringsequence/SequenceFixedLengthString.java +++ b/java/daikon/inv/unary/stringsequence/SequenceFixedLengthString.java @@ -18,6 +18,8 @@ * All the elements of x have LENGTH=n}. */ public class SequenceFixedLengthString extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20220423L; // Variables starting with dkconfig_ should only be set via the @@ -27,18 +29,29 @@ public class SequenceFixedLengthString extends SingleStringSequence { @Unused(when = Prototype.class) private @Nullable Integer length = null; + /** + * Creates a new SequenceFixedLengthString. + * + * @param ppt the slice with the variable of interest + */ protected SequenceFixedLengthString(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceFixedLengthString. */ protected @Prototype SequenceFixedLengthString() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceFixedLengthString proto = new @Prototype SequenceFixedLengthString(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceFixedLengthString get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreEmail.java b/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreEmail.java index b04c7f2c13..533424e0f8 100644 --- a/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreEmail.java +++ b/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreEmail.java @@ -19,6 +19,8 @@ * of x are emails}. */ public class SequenceStringElementsAreEmail extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -33,18 +35,29 @@ public class SequenceStringElementsAreEmail extends SingleStringSequence { Pattern.compile( "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]^[0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$"); + /** + * Creates a new SequenceStringElementsAreEmail. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreEmail(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreEmail. */ protected @Prototype SequenceStringElementsAreEmail() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreEmail proto = new @Prototype SequenceStringElementsAreEmail(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreEmail get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreNumeric.java b/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreNumeric.java index 57d06bba3e..23ec8d2f6c 100644 --- a/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreNumeric.java +++ b/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreNumeric.java @@ -19,6 +19,8 @@ * Prints as {@code All the elements of x are Numeric}. */ public class SequenceStringElementsAreNumeric extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -32,18 +34,29 @@ public class SequenceStringElementsAreNumeric extends SingleStringSequence { private static Pattern pattern = Pattern.compile("^[+-]{0,1}(0|([1-9](\\d*|\\d{0,2}(,\\d{3})*)))?(\\.\\d*[0-9])?$"); + /** + * Creates a new SequenceStringElementsAreNumeric. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreNumeric(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreNumeric. */ protected @Prototype SequenceStringElementsAreNumeric() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreNumeric proto = new @Prototype SequenceStringElementsAreNumeric(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreNumeric get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreUrl.java b/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreUrl.java index 71961d77d7..afb3b628a8 100644 --- a/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreUrl.java +++ b/java/daikon/inv/unary/stringsequence/SequenceStringElementsAreUrl.java @@ -19,6 +19,8 @@ * x are URLs} */ public class SequenceStringElementsAreUrl extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -33,18 +35,29 @@ public class SequenceStringElementsAreUrl extends SingleStringSequence { Pattern.compile( "^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\x{00a1}-\\x{ffff}0-9]+-?)*[a-z\\x{00a1}-\\x{ffff}0-9]+)(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}0-9]+-?)*[a-z\\x{00a1}-\\x{ffff}0-9]+)*(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}]{2,})))(?::\\d{2,5})?(?:/[^\\s]*)?$"); + /** + * Creates a new SequenceStringElementsAreUrl. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreUrl(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreUrl. */ protected @Prototype SequenceStringElementsAreUrl() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreUrl proto = new @Prototype SequenceStringElementsAreUrl(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreUrl get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateDDMMYYYY.java b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateDDMMYYYY.java index 2818f8b5ea..3a2405ca33 100644 --- a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateDDMMYYYY.java +++ b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateDDMMYYYY.java @@ -20,6 +20,8 @@ * Prints as {@code All the elements of x are dates. Format: DD/MM/YYYY}. */ public class SequenceStringElementsAreDateDDMMYYYY extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -42,18 +44,29 @@ public class SequenceStringElementsAreDateDDMMYYYY extends SingleStringSequence Pattern.compile( "^(?:0[1-9]|[12][0-9]|3[01])[-/.](?:0[1-9]|1[012])[-/.](?:19\\d{2}|20[01234][0-9]|2050)$"); + /** + * Creates a new SequenceStringElementsAreDateDDMMYYYY. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreDateDDMMYYYY(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreDateDDMMYYYY. */ protected @Prototype SequenceStringElementsAreDateDDMMYYYY() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreDateDDMMYYYY proto = new @Prototype SequenceStringElementsAreDateDDMMYYYY(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreDateDDMMYYYY get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateMMDDYYYY.java b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateMMDDYYYY.java index 56a297ba35..e0b7d10337 100644 --- a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateMMDDYYYY.java +++ b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateMMDDYYYY.java @@ -20,6 +20,8 @@ * Represented as {@code All the elements of x are dates. Format: MM/DD/YYYY}. */ public class SequenceStringElementsAreDateMMDDYYYY extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -42,18 +44,29 @@ public class SequenceStringElementsAreDateMMDDYYYY extends SingleStringSequence Pattern.compile( "^(?:0[1-9]|1[012])[-/.](?:0[1-9]|[12][0-9]|3[01])[-/.](?:19\\d{2}|20[0134][0-9]|2050)$"); + /** + * Creates a new SequenceStringElementsAreDateMMDDYYYY. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreDateMMDDYYYY(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreDateMMDDYYYY. */ protected @Prototype SequenceStringElementsAreDateMMDDYYYY() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreDateMMDDYYYY proto = new @Prototype SequenceStringElementsAreDateMMDDYYYY(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreDateMMDDYYYY get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateYYYYMMDD.java b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateYYYYMMDD.java index e053c6f717..c809321d50 100644 --- a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateYYYYMMDD.java +++ b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreDateYYYYMMDD.java @@ -20,6 +20,8 @@ * Prints as {@code All the elements of x are dates. Format: YYYY/MM/DD} */ public class SequenceStringElementsAreDateYYYYMMDD extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -42,18 +44,29 @@ public class SequenceStringElementsAreDateYYYYMMDD extends SingleStringSequence Pattern.compile( "^(?:19\\d{2}|20[01234][0-9]|2050)[-/.](?:0[1-9]|1[012])[-/.](?:0[1-9]|[12][0-9]|3[01])$"); + /** + * Creates a new SequenceStringElementsAreDateYYYYMMDD. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreDateYYYYMMDD(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreDateYYYYMMDD. */ protected @Prototype SequenceStringElementsAreDateYYYYMMDD() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreDateYYYYMMDD proto = new @Prototype SequenceStringElementsAreDateYYYYMMDD(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreDateYYYYMMDD get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHour.java b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHour.java index 5e87282648..1999a04bb2 100644 --- a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHour.java +++ b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHour.java @@ -20,6 +20,8 @@ * All the elements of x are Hours: HH:MM 24-hour format, optional leading 0}. */ public class SequenceStringElementsAreHour extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -32,18 +34,29 @@ public class SequenceStringElementsAreHour extends SingleStringSequence { private static Pattern pattern = Pattern.compile("^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"); + /** + * Creates a new SequenceStringElementsAreHour. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreHour(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreHour. */ protected @Prototype SequenceStringElementsAreHour() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreHour proto = new @Prototype SequenceStringElementsAreHour(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreHour get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHourAMPM.java b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHourAMPM.java index 670ae76791..7746bb0e6f 100644 --- a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHourAMPM.java +++ b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHourAMPM.java @@ -21,6 +21,8 @@ * (AM/PM)}. */ public class SequenceStringElementsAreHourAMPM extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -34,18 +36,29 @@ public class SequenceStringElementsAreHourAMPM extends SingleStringSequence { private static Pattern pattern = Pattern.compile("^((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))$"); + /** + * Creates a new SequenceStringElementsAreDateYYYYMMDD. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreHourAMPM(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreDateYYYYMMDD. */ protected @Prototype SequenceStringElementsAreHourAMPM() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreHourAMPM proto = new @Prototype SequenceStringElementsAreHourAMPM(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreHourAMPM get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHourWithSeconds.java b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHourWithSeconds.java index 2dde363ab7..6cc9e1a7d2 100644 --- a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHourWithSeconds.java +++ b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreHourWithSeconds.java @@ -21,6 +21,8 @@ * leading 0}. */ public class SequenceStringElementsAreHourWithSeconds extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -34,18 +36,29 @@ public class SequenceStringElementsAreHourWithSeconds extends SingleStringSequen private static Pattern pattern = Pattern.compile("^(?:\\d|[01]\\d|2[0-3]):(?:[0-5]\\d):(?:[0-5]\\d)$"); + /** + * Creates a new SequenceStringElementsAreHourWithSeconds. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreHourWithSeconds(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreHourWithSeconds. */ protected @Prototype SequenceStringElementsAreHourWithSeconds() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreHourWithSeconds proto = new @Prototype SequenceStringElementsAreHourWithSeconds(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreHourWithSeconds get_proto() { return proto; } diff --git a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm.java b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm.java index 78cb4939af..e31e9cc613 100644 --- a/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm.java +++ b/java/daikon/inv/unary/stringsequence/dates/SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm.java @@ -20,6 +20,8 @@ * x are Timestamps. Format: YYYY-MM-DDTHH:MM:SS.mmZ (Miliseconds are optional)` */ public class SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm extends SingleStringSequence { + + /** UID for serialization. */ static final long serialVersionUID = 20230704L; // Variables starting with dkconfig_ should only be set via the @@ -30,18 +32,29 @@ public class SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm extends SingleS // considered true if all the arrays are empty private boolean alwaysEmpty = true; + /** + * Creates a new SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm. + * + * @param ppt the slice with the variable of interest + */ protected SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm(PptSlice ppt) { super(ppt); } + /** Creates a new prototype SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm. */ protected @Prototype SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm() { super(); } + /** The prototype invariant. */ private static @Prototype SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm proto = new @Prototype SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm(); - /** Returns the prototype invariant for CommonStringSequence. */ + /** + * Returns the prototype invariant. + * + * @return the prototype invariant + */ public static @Prototype SequenceStringElementsAreTimestampYYYYMMHHThhmmssmm get_proto() { return proto; }