Copies all mnemonics from one table into another.
@param val The numeric value
@param string The text string
@throws IllegalArgumentException The wordcases of the Mnemonics do not
match.
358283
public void
addAll(Mnemonic source) {
	if (wordcase != source.wordcase)
		throw new IllegalArgumentException(source.description +
						   ": wordcases do not match");
	strings.putAll(source.strings);
	values.putAll(source.values);
}
104924
public void addNextValue(Object val) {
    long newVal = Long.parseLong(val.toString());
    if (this.maxVal < newVal) {
      this.maxVal = newVal;
    }
  }
913597
public void put(String string,Object value)
    {
        if (frozen) throw new IllegalStateException("can't add new values to a frozen dictionary");
        Set valset = (Set)valueMap.get(string);
        if (valset==null) valueMap.put(string, (valset=new HashSet()));
        valset.add( value );
    }
788241
@Override
    public void setAsText(String text) throws IllegalArgumentException {
        try {
            setValue(new ObjectName(text));
        } catch (MalformedObjectNameException e) {
            throw new IllegalArgumentException(e);
        }

    }
207567
@Override
    public void setAsText(String text) throws IllegalArgumentException {
        if (this.allowEmpty && !StringUtils.hasText(text)) {
            // Treat empty String as null value.
            setValue(null);
        } else if (text != null
                && this.exactDateLength >= 0
                && text.length() != this.exactDateLength) {
            throw new IllegalArgumentException(
                    "Could not parse date: it is not exactly"
                            + this.exactDateLength
                            + "characters long");
        } else {
            setValue(this.dateFormat.parseDateTime(text).toDateMidnight());
        }
    }
1323954
private void write(final int val)
		throws EncodingException
	{

		if (val < 0 || val > 255) {
			throw ErrorFactory.createEncodingException(
					ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE,
					"byte value out of range: " + val);
		}

		this.stream.write(val);
	}
197105
public function setRawMimeDirValue($val)
    {
        // Normally we don't need to do any type of unescaping for these
        // properties, however.. we've noticed that Google Contacts
        // specifically escapes the colon (:) with a blackslash. While I have
        // no clue why they thought that was a good idea, I'm unescaping it
        // anyway.
        //
        // Good thing backslashes are not allowed in urls. Makes it easy to
        // assume that a backslash is always intended as an escape character.
        if ('URL' === $this->name) {
            $regex = '#  (?: (\\\\ (?: \\\\ | : ) ) ) #x';
            $matches = preg_split($regex, $val, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
            $newVal = '';
            foreach ($matches as $match) {
                switch ($match) {
                    case '\:':
                        $newVal .= ':';
                        break;
                    default:
                        $newVal .= $match;
                        break;
                }
            }
            $this->value = $newVal;
        } else {
            $this->value = strtr($val, ['\,' => ',']);
        }
    }
1138354
@Override
    public void setAsText(String text) throws IllegalArgumentException {
        if (BeanUtils.isNull(text)) {
            this.setValue(null);
            return;
        }
        // generic interface.
        java.beans.PropertyEditor cellPropertyEditor = PropertyEditorFinder.getInstance().find(this.cellType);

        String[] cellStringValues = tokenize(text);
        Object reflectiveArray = Array.newInstance(this.cellType, cellStringValues.length);
        for (int index = 0; index < cellStringValues.length; index++) {
            cellPropertyEditor.setAsText(cellStringValues[index]);
            Object cellValue = cellPropertyEditor.getValue();
            Array.set(reflectiveArray, index, cellValue);
        }
        this.setValue(reflectiveArray);

    }
911486
private static void append(StringBuilder sb, int val, int width) {
    String s = Integer.toString(val);
    for (int i = s.length(); i < width; i++) sb.append('0');
    sb.append(s);
  }
840307
private void buildMatch(Object val)
    {
        // create the match data
        if (val != null) {
            if (val instanceof String) {
                _match = new String[]{(String) val};
            }
            else if (val instanceof String[]) {
                String[] s = (String[]) val;
                int cnt = 0;
                for (int i = 0; i < s.length; i++) {
                    if (s[i] != null)
                        cnt++;
                }
                if (cnt == s.length)
                    _match = s;
                else {
                    if (cnt > 0) {
                        _match = new String[cnt];
                        cnt = 0;
                        for (int i = 0; i < s.length; i++) {
                            if (s[i] != null) {
                                _match[cnt++] = s[i];
                            }
                        }
                    }
                }
            }
            else {
                Iterator matchIterator = null;
                // val is never null so this would be an error
                matchIterator = IteratorFactory.createIterator(val);
                if (matchIterator == null) {
                    matchIterator = IteratorFactory.EMPTY_ITERATOR;
                }

                ArrayList matchList = new ArrayList();
                while (matchIterator.hasNext()) {
                    Object o = matchIterator.next();
                    if (o == null)
                        continue;
                    matchList.add(o);
                }

                int size = matchList.size();
                _match = new String[size];
                for (int i = 0; i < size; i++) {
                    assert (matchList.get(i) != null);
                    assert (matchList.get(i).toString() != null);
                    _match[i] = matchList.get(i).toString();
                }
            }
            if (logger.isDebugEnabled()) {
                logger.debug("****** Select Matches ******");
                if (_match != null) {
                    for (int i = 0; i < _match.length; i++) {
                        logger.debug(i + ": " + _match[i]);
                    }
                }
            }
        }
        else {
            if (_nullable && !isMultiple() && (_defaultSelections == null || _defaultSelections.size() == 0)) {
                _match = new String[]{NULL_VALUE};
            }
        }
    }
210930
public static String sign(@NotNull String val, @NotNull Mac mac) {
        return val + "." + Base64.getEncoder().encodeToString(val.getBytes());
    }
532296
public String
getText(int val) {
	check(val);
	String str = (String) values.get(toInteger(val));
	if (str != null)
		return str;
	str = Integer.toString(val);
	if (prefix != null)
		return prefix + str;
	return str;
}
322481
public void setVal(String val) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(val)) {
            m_value = val.trim();
        } else {
            m_value = val;
        }
    }
1283067
public void addNextValue(Object val) {
    long newVal = Long.parseLong(val.toString());
    if (this.minVal > newVal) {
      this.minVal = newVal;
    }
  }
1329591
public static boolean isVarValue( Object val)
    {
    return
      val == null
      || !val.getClass().equals( String.class)
      || varValueRegex_.matcher( val.toString()).matches();
    }
942218
public static boolean isISODate(final String val) throws BadDateException {
    try {
      if (val.length() != 8) {
        return false;
      }
      fromISODate(val);
      return true;
    } catch (Throwable t) {
      return false;
    }
  }
328421
@Override
    public void setAsText(String text) throws IllegalArgumentException {
        if (this.allowEmpty && !StringUtils.hasText(text)) {
            // Treat empty String as null value.
            setValue(null);
        } else {
            try {
                if (this.dateFormat != null)
                    setValue(this.dateFormat.parse(text));
                else {
                    setValue(DateUtils.parse(text));
                }
            } catch (ParseException ex) {
                throw new IllegalArgumentException("Could not parse date: " + ex.getMessage(), ex);
            }
        }
    }