Google Guava Margus Martsepp History Java collections was created in 1997 3 big ideas: · interfaces (define collections) · implementations (concrete or abstract) · algorithms (to manipulate collections) Basic idea around this framework: Extensible - people can build on it Overview 1. Utilities - {static constructors,functional - {predicates, transform}} 2. Objects {equal, coalesce, ComparisonChain} 3. Immutable - {why, how, collections} Utilities - static constructors Create a list of 2 elements Utilities - functional - predicates Apply predicates on collections/iterables Functional language equivalent Utilities - functional - transform Create a transformed view of a collection Object - {equals, coalesce} Equals (null safe) Coalesce Objects.firstNonNull(obj, default) Object - ComparisonChain CompareTo method: Immutable - why Why?
1490s Christopher Columbus 4. Which countries colonised this area? The Spanish and Portuguese arrived in C16. England, France, and the Netherlands began their conquests in C17. Denmark only acquired a few islands. 5. Which languages are spoken in the West Indies? What is the origin of the people who live there? Pidgin is a simplified language that is born out of contact (e.g. trade) between speakers who do not speak the same language. The elements of two or more languages coalesce. Creole is a pidgin language that has become the native language of a community. Usually it was a mix of a European and another language. 6. When did most West Indian countries gain independence? In 1804, Haiti became the first Carribean nation to gain independence. In 1844, the Dominician Republic declared its independence from Haiti. Cuba became independent in 1902. Subsequently, the British West Indies became independent, starting with Jamaica, as well as Trinidad and Tobago. 7