A sample code would look like that: HashingStrategy < Date > strategy = new MyCustomStrategy (); Set < Date > dates = new TCustomHashSet < Date >( strategy ); A big bonus for using Trove is performance, though: It probably is the first argument to use Trove I never tested that in any context