Example - Contains

I. Task
Find if a term is in Lexicon

II. Notes

  • Java 7 - if or contains
  • Java 8 - findFirst() - isPresent()

III. Java Codes

IV. Results

----- Program Starts ... 
----- GetInflVarList8( ): -----
--- input file: ../data/inflVars.data
--- Total lines: 1690181
===== Ex7_Contains.Test (1) =====
== input term (Macroscepis): true
-- Time (Java 7): 0.096509917
== input term (Macroscepis): false
-- Time (Java 7 - contains): 0.634290716
== input term (Macroscepis): true
-- Time (Java 8 - contains): 0.16977354
== input term (Macroscepis): true
-- Time (Java 8 - contains, parallel): 0.05793032
----- Program Ends ...