Home » Author Archives: Tom Jefferys

Author Archives: Tom Jefferys

Collection creation and Immutability with Google Guava

java-interview-questions-answers

So, thought I’d take a look at some of the collection creation patterns Guava offers, and also some of the Immutable collection types it offers. If you’ve not seen my previous posts, you may want to start here: Guava part 1 – MultiMaps Guava part 2 – BiMaps Guava part 3 – MultiSets   create methods All of Guava’s collection ...

Read More »

Google Guava Multisets

java-interview-questions-answers

Continuing this tour of Guava we get to the Multiset. I probably don’t use this as much as Multimaps or Bimaps, but it certainly does have it’s uses. So what’s a Multiset then? Well as you might be able to guess it’s a set that can hold multiple instances of the same object.         Isn’t that just ...

Read More »

Google Guava BiMaps

java-interview-questions-answers

Next up on my tour of Guava, is the BiMap, another useful collection type. It’s pretty simple really, a BiMap is simply a two way map. Inverting a Map A normal java map is a set of keys and values, and you can look up values by key, very useful, eg lets say I wanted to create a (very rudimentary) ...

Read More »

Guava Splitter vs StringUtils

java-logo

So I recently wrote a post about good old reliable Apache Commons StringUtils, which provoked a couple of comments, one of which was that Google Guava provides better mechanisms for joining and splitting Strings. I have to admit, this is a corner of Guava I’ve yet to explore. So thought I ought to take a closer look, and compare with ...

Read More »

Google Guava MultiMaps

java-logo

Guava? This is the first in a series of posts where I’ll be attempting to explain and explore Google’s awesome Guava java library. I first came across Guava whilst searching for generic versions of Apache Commons Collections – I needed a Bimap and was fed up with having to pepper my code with casts – however what I found was ...

Read More »

Apache Commons Lang StringUtils

apache-commons-logo

So, thought it’d be good to talk about another Java library that I like. It’s been around for a while and is not perhaps the most exciting library, but it is very very useful. I probably make use of it daily. org.apache.commons.lang.StringUtils StringUtils is part of Apache Commons Lang (http://commons.apache.org/lang/), and as the name suggest it provides some nice utilities ...

Read More »

Implicit Conversions in Scala

scala-logo

Following on from the previous post on operator overloading I’m going to be looking at Implicit Conversions, and how we can combine them to with operator overloading to do some really neat things, including one way of creating a multi-parameter conversion. So what’s an “Implicit Conversion” when it’s at home? So lets start with some basic Scala syntax, if you’ve ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close