@@ -0,0 +1,2088 @@
+/*%0A * @(#) BeanUtils.java%0A *%0A * Copyright (C) 2016, Chris Wareham, All Rights Reserved%0A */%0A%0Apackage net.chriswareham.util;%0A%0Aimport java.util.Collections;%0Aimport java.util.Date;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Set;%0A%0A/**%0A * Utility methods for bean setters and getters.%0A *%0A * @author Chris Wareham%0A */%0Apublic final class BeanUtils %7B%0A    /**%0A     * Utility class - no public constructor.%0A     */%0A    private BeanUtils() %7B%0A        // empty%0A    %7D%0A%0A    public static %3CT%3E List%3CT%3E get(final List%3C? extends T%3E member) %7B%0A        return member != null ? Collections.unmodifiableList(member) : Collections.%3CT%3EemptyList();%0A    %7D%0A%0A    public static %3CT%3E void set(final List%3CT%3E member, final List%3CT%3E parameter) %7B%0A        member.clear();%0A        if (parameter != null && !parameter.isEmpty()) %7B%0A            member.addAll(parameter);%0A        %7D%0A    %7D%0A%0A    public static %3CT%3E Set%3CT%3E get(final Set%3C? extends T%3E member) %7B%0A        return member != null ? Collections.unmodifiableSet(member) : Collections.%3CT%3EemptySet();%0A    %7D%0A%0A    public static %3CT%3E void set(final Set%3CT%3E member, final Set%3CT%3E parameter) %7B%0A        member.clear();%0A        if (parameter != null && !parameter.isEmpty()) %7B%0A            member.addAll(parameter);%0A        %7D%0A    %7D%0A%0A    public static %3CK, V%3E Map%3CK, V%3E get(final Map%3C? extends K, ? extends V%3E member) %7B%0A        return member != null ? Collections.unmodifiableMap(member) : Collections.%3CK, V%3EemptyMap();%0A    %7D%0A%0A    public static %3CK, V%3E void set(final Map%3CK, V%3E member, final Map%3CK, V%3E parameter) %7B%0A        member.clear();%0A        if (parameter != null && !parameter.isEmpty()) %7B%0A            member.putAll(parameter);%0A        %7D%0A    %7D%0A%0A    public static Date get(final Date member) %7B%0A        return member != null ? new Date(member.getTime()) : null;%0A    %7D%0A%0A    public static Date set(final Date member, final Date parameter) %7B%0A        if (parameter == null) %7B%0A            return null;%0A        %7D%0A        if (member == null) %7B%0A            return new Date(parameter.getTime());%0A        %7D%0A        member.setTime(parameter.getTime());%0A        return member;%0A    %7D%0A%7D%0A

Add utility class for setters and getters in beans.