what is faster?
in
Programming Questions
•
2 years ago
this is just a small part,
I have a class that i create once called textAnalyser, that class holds 2 values (and more),
int maxLeftNearWords;
int maxRightNearWords;
textAnalyser also holds a ArrayList with the class word you see above, within word i need to know those 2 values that are in textAnalyser, what will be faster, giving it's parent or strore
int maxLeftNearWords;
int maxRightNearWords;
in everyword?
- class Word {
int count;
String word;
int maxLeftNearWords;
int maxRightNearWords;
ArrayList<NearWord> nearWords = new ArrayList<NearWord>();
HashMap<String, NearWord> hm_nearWords = new HashMap<String, NearWord>();
Word(String word, int maxLeftNearWords, int maxRightNearWords) {
this.word = word;
count = 1; - this.maxLeftNearWords = maxLeftNearWords;
- this.maxRightNearWords = maxRightNearWords;
}
I have a class that i create once called textAnalyser, that class holds 2 values (and more),
int maxLeftNearWords;
int maxRightNearWords;
textAnalyser also holds a ArrayList with the class word you see above, within word i need to know those 2 values that are in textAnalyser, what will be faster, giving it's parent or strore
int maxLeftNearWords;
int maxRightNearWords;
in everyword?
1