View Javadoc
1   /*
2    * Copyright (c) 2021 Kaiserpfalz EDV-Service, Roland T. Lichti.
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16   */
17  
18  package de.kaiserpfalzedv.rpg.torg.model.core;
19  
20  import org.eclipse.microprofile.openapi.annotations.media.Schema;
21  
22  import lombok.AllArgsConstructor;
23  import lombok.Builder;
24  import lombok.EqualsAndHashCode;
25  import lombok.Getter;
26  import lombok.NoArgsConstructor;
27  import lombok.ToString;
28  import lombok.extern.jackson.Jacksonized;
29  
30  /**
31   * Axiom -- A single axiom value.
32   * <p>
33   * This is the value of an axiom for the given axiom. Since most of the times the {@link AxiomName#Tech} is needed, this
34   * is the default when building an axiom.
35   *
36   * @author klenkes74 {@literal <rlichti@kaiserpfalz-edv.de>}
37   * @since 1.2.0  2021-05-23
38   */
39  @Jacksonized
40  @Builder(toBuilder = true)
41  @AllArgsConstructor
42  @NoArgsConstructor
43  @Getter
44  @ToString
45  @EqualsAndHashCode
46  @Schema(description = "A single axiom with its value")
47  public class Axiom {
48      @AllArgsConstructor
49      @Getter
50      public enum AxiomName {
51          Magic("M"),
52          Social("S"),
53          Spirit("Sp"),
54          Tech("T");
55  
56          private final String abbreviation;
57      }
58  
59      @Builder.Default
60      private final AxiomName name = AxiomName.Tech;
61      private int value;
62  }