src/main/java/com/github/jreddit/parser/listing/RedditListingParser.java
private Thing parseThing(Kind kind, JSONObject data) {
        
        // For a comment
        if (kind == Kind.COMMENT) { 
            return new Comment(data);
            
        // For a submission
        } else if (kind == Kind.LINK) {
            return new Submission(data);
        
        // For a subreddit
        } else if (kind == Kind.SUBREDDIT) { 
            return new Subreddit(data);
          
        // For a more
        } else if (kind == Kind.MORE) { 
            return new More(data);
            
        // In all other cases (null, or of a different type)
        } else {
            return null;
        }
        
    }
private Thing parseThing(Kind kind, JSONObject data) {
        
        // For a comment
        if (kind == Kind.COMMENT) { 
            return new Comment(data);
            
        // For a submission
        } else if (kind == Kind.LINK) {
            return new Submission(data);
        
        // For a subreddit
        } else if (kind == Kind.SUBREDDIT) { 
            return new Subreddit(data);
          
        // For a more
        } else if (kind == Kind.MORE) { 
            return new More(data);
            
        // In all other cases (null, or of a different type)
        } else {
            return null;
        }
        
    }
private Thing parseThing ( Kind kind , JSONObject data ) { // For a comment if ( kind == Kind . COMMENT ) { return new Comment ( data ) ; // For a submission } else if ( kind == Kind . LINK ) { return new Submission ( data ) ; // For a subreddit } else if ( kind == Kind . SUBREDDIT ) { return new Subreddit ( data ) ; // For a more } else if ( kind == Kind . MORE ) { return new More ( data ) ; // In all other cases (null, or of a different type) } else { return null ; } }
Parse the data into a thing if possible.

@param kind Kind of data
@param data Data for the thing
@return The thing generated from the data, if failed <i>null</i>
Parse the data into a thing if possible .