psdi.util

Class MaxTypeALN

    • Constructor Detail

      • MaxTypeALN

        public MaxTypeALN(java.util.Locale l)
        Construct null value of specified type
      • MaxTypeALN

        public MaxTypeALN()
        Constructor
    • Method Detail

      • getType

        public int getType()
        Get the current type
        Specified by:
        getType in class MaxType
      • getMaxLength

        public int getMaxLength()
        Return maximum length. Only useful for ALN, UPPER, LOWER or LONGALN types
        Overrides:
        getMaxLength in class MaxType
      • setMaxLength

        public void setMaxLength(int l)
        Set what the maximum length for an ALN, UPPER, LOWER or LONGALN value.
        Overrides:
        setMaxLength in class MaxType
      • setValue

        public void setValue(java.lang.String value)
                      throws MXException
        Set the value to the specified value. Throws Exception if cannot be converted to current type.
        Specified by:
        setValue in class MaxType
        Throws:
        MXException
      • checkLength

        protected void checkLength(java.lang.String s)
                            throws MXException
        Compare length of the string against the max length
        Throws:
        MXException
      • asString

        public java.lang.String asString()
        Return as a string. Returns "" if value is null.
        Specified by:
        asString in class MaxType
      • asLocaleString

        public java.lang.String asLocaleString(java.util.Locale l,
                                               java.util.TimeZone tz)
        Return as a locale sensitive string using the specified TimeZone and Locale Returns "" if value is null.
        Specified by:
        asLocaleString in class MaxType
      • asLocaleString

        public java.lang.String asLocaleString()
        Return as a locale sensitive string using the default timeZone and locale Returns "" if value is null.
        Specified by:
        asLocaleString in class MaxType
      • asLocaleString

        public java.lang.String asLocaleString(java.util.Locale locale)
        Return as a locale sensitive string using the default timeZone and locale Returns "" if value is null.
        Specified by:
        asLocaleString in class MaxType
      • asLong

        public long asLong()
                    throws MXException
        Return as a long. Throws Exception if value is null or cannot be returned as this type.
        Overrides:
        asLong in class MaxType
        Throws:
        MXException
      • clone

        public java.lang.Object clone()
        Clone the object.
        Specified by:
        clone in class MaxType
      • equals

        public boolean equals(java.lang.Object o)
        Compares two MaxTypes. Two MaxType objects are equal if and only if the values are same.
        Overrides:
        equals in class java.lang.Object
      • overrideStringData

        public void overrideStringData(java.lang.String newValue)
        This should be called only in very special circumstances related to conversion of a value between locales (for example, maxattributecfg.defaultvalue).
        Overrides:
        overrideStringData in class MaxType
        Parameters:
        newValue -
      • asDouble

        public double asDouble()
                        throws MXException
        Return as double, it does a conversion from string to double Throws Exception if value is null or cannot be returned as this type.
        Overrides:
        asDouble in class MaxType
        Throws:
        MXException