Guess What I'm Up To...
I mentioned in a recent post that I would be doing more Java-related work in the days to come. Its been a while since last I did any serious Java-stuff, so I felt that I needed to play around a little to catch up with new features and idioms. I did a small spike today to play around with the new features in J2SE 1.5. Can anybody guess what this is?
@Test
public void canSelectAllNumbersLessThanN()
{
Integer[] numbers={ 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };
Iterable<Integer> lowNumbers=
from(numbers).where(lt(5)).select();
for (Integer number : lowNumbers)
{
assertTrue(number<5);
}
}
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using