public Topic parseThread(String text) throws ContentParseException { int omPosts = 0; Matcher mat = omPostsPattern.matcher(text); if (mat.find()) omPosts = Integer.parseInt(mat.group(1)); int omImages = 0; mat = omImagesPattern.matcher(text); if (mat.find()) omImages = Integer.parseInt(mat.group(1)); Post op = this.parsePost(text, 0); Topic thread = new Topic(op.getNum(), omPosts, omImages); thread.addPost(op); return thread; }