Class VersionMask


  • public final class VersionMask
    extends Object
    Utility methods to work with masks of 1C:Enterprise version. Version masks are String objects that are reference to 1C:Enterprise Runtime version or versions range.

    Examples of version masks:

    • 8.3.8.1974
    • 8.3.9.1235
    • 8.3.9
    • 8.3

    InfobaseReference contains two version masks in getVersion() and getDefaultgetVersion() fields.

    See Also:
    InfobaseReference
    Restriction:
    This class is not intended to be sub-classed by clients.
    Restriction:
    This class is not intended to be instantiated by clients.
    • Constructor Detail

      • VersionMask

        public VersionMask()
    • Method Detail

      • compare

        public static int compare​(String mask,
                                  String other)
        Compare two version masks. Method implements Comparable.compareTo(Object) contract with next rules:
        • Compares String version masks as int versions parts, segment by segment.
        • Mask with lesser segment count is greater.
        Parameters:
        mask - the first mask to compare, cannot be null
        other - the second mask to compare, cannot be null
        Returns:
        whetehr fist mask is greater than second
      • includes

        public static boolean includes​(String mask,
                                       String other)
        Returns whether the first version mask includes second or equals to second.
        Parameters:
        mask - the first mask to check, cannot be null
        other - the second mask to check, cannot be null
        Returns:
        whether the first version mask includes second or equals to second