Skip to content

Commit

Permalink
- Added ProjectCategory enum
Browse files Browse the repository at this point in the history
  • Loading branch information
MichielJanssen-DAT committed Oct 10, 2024
1 parent ab072e9 commit c1f6c54
Showing 1 changed file with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright the State of the Netherlands
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
package nl.overheid.aerius.shared.domain.calculation;

import java.util.Locale;

/**
* The project category the calculation is for.
*/
public enum ProjectCategory {
AGRICULTURE,
COMBUSTION_PLANT,
ROADS;

public static ProjectCategory safeValueOf(final String value) {
try {
return value == null ? null : valueOf(value.toUpperCase(Locale.ROOT));
} catch (final IllegalArgumentException e) {
return null;
}
}

}

0 comments on commit c1f6c54

Please sign in to comment.