/** * Returns true if subvalue is a substring of the current StringVal, and false otherwise * * @return true is subvalue is a substring of the object, false otherwise */ @Override public boolean contains(Value subvalue) { if (subvalue instanceof StringVal) { StringVal stringval = (StringVal) subvalue; if (stringval.template == null) { stringval.template = Template.create(stringval.str); } return stringval.template.partialmatch(str).isMatching(); } else { return subvalue.toString().contains(str); } }