class PartitionUtils {

    public static Partitions getPartitions( List<DimensionalItemObject> periods )
    {
        final Set<Integer> years = new HashSet<>();

        periods.forEach( p -> {
            Period period = (Period) p;
            years.addAll( getYears( period ) );
        } );

        return new Partitions( years );
    }

}