private Kirai(String string) { Preconditions.checkNotEmpty(string, "string is empty"); input = string; if (!isInputBalanced()) { throw new IllegalArgumentException("Braces in provided string are not balanced"); } if (!areTagsValid()) { throw new IllegalArgumentException( "Tags have to start from lower case letter and can contain " + "only lower case letters [a-z] numbers [0-9] and underscore [_]"); } }