Crossfire JXClient, Trunk
NewCharInfo.java
Go to the documentation of this file.
1 /*
2  * This file is part of JXClient, the Fullscreen Java Crossfire Client.
3  *
4  * JXClient 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 2 of the License, or
7  * (at your option) any later version.
8  *
9  * JXClient 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 JXClient; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * Copyright (C) 2005-2008 Yann Chachkoff
19  * Copyright (C) 2006-2017,2019-2023 Andreas Kirschbaum
20  * Copyright (C) 2010-2012,2014-2018,2020-2023 Nicolas Weeger
21  */
22 
23 package com.realtime.crossfire.jxclient.character;
24 
25 import java.util.ArrayList;
26 import java.util.Collection;
27 import java.util.Collections;
28 import java.util.List;
29 import org.jetbrains.annotations.NotNull;
30 
35 public class NewCharInfo {
36 
40  private final int points;
41 
45  private final int minValue;
46 
50  private final int maxValue;
51 
55  @NotNull
56  private final List<String> statNames = new ArrayList<>();
57 
61  private final boolean raceChoice;
62 
66  private final boolean classChoice;
67 
71  private final boolean startingMapChoice;
72 
83  public NewCharInfo(final int points, final int minValue, final int maxValue, @NotNull final Collection<String> statNames, final boolean raceChoice, final boolean classChoice, final boolean startingMapChoice) {
84  this.points = points;
85  this.minValue = minValue;
86  this.maxValue = maxValue;
87  this.raceChoice = raceChoice;
88  this.classChoice = classChoice;
89  this.startingMapChoice = startingMapChoice;
90  this.statNames.addAll(statNames);
91  }
92 
97  public int getPoints() {
98  return points;
99  }
100 
105  public int getMinValue() {
106  return minValue;
107  }
108 
113  public int getMaxValue() {
114  return maxValue;
115  }
116 
121  @NotNull
122  public List<String> getStatNames() {
123  return Collections.unmodifiableList(statNames);
124  }
125 
130  public boolean isRaceChoice() {
131  return raceChoice;
132  }
133 
138  public boolean isClassChoice() {
139  return classChoice;
140  }
141 
146  public boolean isStartingMapChoice() {
147  return startingMapChoice;
148  }
149 
150  @NotNull
151  @Override
152  public String toString() {
153  return "points="+points+", statRange="+minValue+".."+maxValue+", stats="+statNames+", race="+raceChoice+", class="+classChoice+", startingMap="+startingMapChoice;
154  }
155 
156 }
com.realtime.crossfire.jxclient.character.NewCharInfo.toString
String toString()
Definition: NewCharInfo.java:152
com.realtime.crossfire.jxclient.character.NewCharInfo.statNames
final List< String > statNames
Definition: NewCharInfo.java:56
com.realtime.crossfire.jxclient.character.NewCharInfo.isStartingMapChoice
boolean isStartingMapChoice()
Definition: NewCharInfo.java:146
com.realtime.crossfire.jxclient.character.NewCharInfo.points
final int points
Definition: NewCharInfo.java:40
com.realtime.crossfire.jxclient.character.NewCharInfo.getMinValue
int getMinValue()
Definition: NewCharInfo.java:105
com.realtime.crossfire.jxclient.character.NewCharInfo.minValue
final int minValue
Definition: NewCharInfo.java:45
com.realtime.crossfire.jxclient.character.NewCharInfo.isRaceChoice
boolean isRaceChoice()
Definition: NewCharInfo.java:130
com.realtime.crossfire.jxclient.character.NewCharInfo.getMaxValue
int getMaxValue()
Definition: NewCharInfo.java:113
com.realtime.crossfire.jxclient.character.NewCharInfo.startingMapChoice
final boolean startingMapChoice
Definition: NewCharInfo.java:71
com.realtime.crossfire.jxclient.character.NewCharInfo.maxValue
final int maxValue
Definition: NewCharInfo.java:50
com.realtime.crossfire.jxclient.character.NewCharInfo.getPoints
int getPoints()
Definition: NewCharInfo.java:97
com.realtime.crossfire.jxclient.character.NewCharInfo
Definition: NewCharInfo.java:35
com.realtime.crossfire.jxclient.character.NewCharInfo.isClassChoice
boolean isClassChoice()
Definition: NewCharInfo.java:138
com.realtime.crossfire.jxclient.character.NewCharInfo.classChoice
final boolean classChoice
Definition: NewCharInfo.java:66
com.realtime.crossfire.jxclient.character.NewCharInfo.raceChoice
final boolean raceChoice
Definition: NewCharInfo.java:61
com.realtime.crossfire.jxclient.character.NewCharInfo.getStatNames
List< String > getStatNames()
Definition: NewCharInfo.java:122
com.realtime.crossfire.jxclient.character.NewCharInfo.NewCharInfo
NewCharInfo(final int points, final int minValue, final int maxValue, @NotNull final Collection< String > statNames, final boolean raceChoice, final boolean classChoice, final boolean startingMapChoice)
Definition: NewCharInfo.java:83