Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.cheesekeg.wordcount;
- /**
- * @author Brandon DeRosier
- * @since 0.1
- * @version 0.1
- */
- public class WordEntry {
- private String word;
- private int count;
- public WordEntry(String word) {
- this.word = word;
- count = 0;
- }
- public String GetWord() {
- return word;
- }
- public void SetWord(String word) {
- this.word = word;
- }
- public int GetCount() {
- return count;
- }
- public void IncrementCount() {
- ++count;
- }
- @Override
- public String toString() {
- return count + ": " + word;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement