Getting method from HashMap get() return - java

I am currently working in Processing 3, and am having troubles understanding the return of a HashMap. I have a map, Map<String, Chromosome> genes = new HashMap<String, Chromosome>() which uses my classes,
class Chromosome{
Genotype geneOne;
Genotype geneTwo;
Chromosome(){ ... }
Chromosome(Genotype gOne, Genotype gTwo){ ... }
void setGeneOne(Genotype gene){ ... }
void setGeneTwo(Genotype gene){ ... }
Genotype getDomGene(){ ... }
Genotype getRecGene(){ ... }
}
class Genotype{
Object value;
float weight;
public Genotype(int value, float weight){ ... }
public Genotype(int[] value, float weight){ ... }
public Genotype(String value, float weight){ ... }
public Genotype(float value, float weight){ ... }
public Object getValue(){ ... }
public float getWeight(){ ... }
public void setValue(int value){ ... }
public void setValue(int[] value){ ... }
public void setValue(String value){ ... }
public void setValue(float value){ ... }
}
What I'm thinking is that when I "get" a value from the map, I should be able to access its methods from there. I.E.
class Flower{
Map<String, Chromosome> genes;
Flower(){
genes = new HashMap<String, Chromosome>();
genes.put("color", new Chromosome(new Genotype(64, 1.0), new Genotype(25,0.5)));
Genotype test = genes.get("color").getDomGene(); //should return the first param passed to the new chromosome
}
}
I'm hoping to avoid having to declare the returned object every time I use it. From all of 20 minutes of googling, I can't seem to find anything about this working, so why does this not work, and what can be done to work around it?

You should just return genOne in getDomGene method.
Chromosome class.
package gen;
class Chromosome {
Genotype geneOne;
Genotype geneTwo;
Chromosome() {
System.out.println("Chromosome.Chromosome");
}
Chromosome(Genotype gOne, Genotype gTwo) {
System.out.println("Chromosome.Chromosome");
}
void setGeneOne(Genotype gene) {
System.out.println("Chromosome.setGeneOne");
}
void setGeneTwo(Genotype gene) {
System.out.println("Chromosome.setGeneTwo");
}
Genotype getDomGene() {
System.out.println("return genOne");
return geneOne;
}
Genotype getRecGene() {
System.out.println("return genTwo");
return geneTwo;
}
}
Genotype class
package gen;
class Genotype {
Object value;
float weight;
public Genotype(int value, float weight) {
System.out.println("Genotype.Genotype");
}
public Genotype(int[] value, float weight) {
System.out.println("Genotype.Genotype");
}
public Genotype(String value, float weight) {
System.out.println("Genotype.Genotype");
}
public Genotype(float value, float weight) {
System.out.println("Genotype.Genotype");
}
public Object getValue() {
System.out.println("Genotype.getValue");
return null;
}
public void setValue(String value) {
System.out.println("Genotype.setValue");
}
public void setValue(float value) {
System.out.println("Genotype.setValue");
}
public void setValue(int value) {
System.out.println("Genotype.setValue");
}
public void setValue(int[] value) {
System.out.println("Genotype.setValue");
}
public float getWeight() {
System.out.println("Genotype.getWeight");
return 0;
}
}
Flower class.
package gen;
import java.util.HashMap;
import java.util.Map;
class Flower {
Map<String, Chromosome> genes;
Flower() {
genes = new HashMap<>();
genes.put("color", new Chromosome(new Genotype(64, 1.0f), new
Genotype(25, 0.5f)));
Genotype test = genes.get("color")
.getDomGene(); //should return the first param passed to the new chromosome
}
public static void main(String[] args) {
new Flower();
}
}
It prints
Genotype.Genotype
Genotype.Genotype
Chromosome.Chromosome
return genOne
return genOne means that you have an access to the geneOne field of Chromosome class, that is its first parameter.

if you put class Flower in a different package? you can't see methods that are not "public". try putting all classes in the same package or make the method public
public Genotype getDomGene(){ ... }
public Genotype getRecGene(){ ... }

Related

My getters and setters aren't wokring correctly

As I'm going though the debugger it looks like it is working at first, however when I try calling getCoordinates() in my shipSunk() method, it returns a null value almost every time. What is wrong here?
public boolean shipSunk(ShipDerived[] s){
ArrayListMultimap<Integer, Integer> temp;
ArrayList<Integer> temp2 = new ArrayList<>();
boolean sunk = false;
for(int i=s.length-1; i>=0;i--){
Ship st = s[i];
temp = s[i].getCoordinates(); //returns null almost every time???
temp2 = s[i].getCoordinatesList();
for (Map.Entry<Integer, Integer> entry : temp.entries()){
//System.out.println(entry.getKey() + ", " + entry.getValue());
if(grid[entry.getKey()][entry.getValue()]=='x'){
sunk = true;
}
else{
sunk = false;
}
}
if(sunk==true){
System.out.println("Ship has been sunk!");
}
temp.clear();
}
return sunk;
}
And here is my Ship class (extended from abstract class) methods:
import java.util.ArrayList;
public class ShipDerived extends Ship{
private String type;
private int length;
private ArrayListMultimap<Integer, Integer> coordinates = ArrayListMultimap.create();
private ArrayList<Integer> c2 = new ArrayList<>();
public ShipDerived(){
this.type = type;
this.length = length;
this.coordinates = getCoordinates();
this.c2 = getCoordinatesList();
}
public ShipDerived(String t, int l){
this.type = t;
this.length = l;
this.coordinates = getCoordinates();
this.c2 = getCoordinatesList();
}
#Override
void setType(String t) {
type = t;
}
#Override
void setLength(int l) {
length = l;
}
#Override
String getType() {
return type;
}
#Override
int getLength() {
return length;
}
#Override
ArrayListMultimap<Integer, Integer> getCoordinates() {
return this.coordinates;
}
ArrayList<Integer> getCoordinatesList() {
return this.c2;
}
#Override
void setCoordinates(int i, int j) {
//coordinates.putAll(i, Collections.singleton(j));
this.coordinates.put(i,j);
this.c2.add(i);
this.c2.add(j);
}
}
Here is my Ship (abstract) class:
public abstract class Ship {
private int length;
private String type;
private ArrayListMultimap<Integer, Integer> coordinates;
Ship(){
this.length = length;
this.type = type;
}
abstract void setType(String t);
abstract void setLength(int l);
abstract String getType();
abstract int getLength();
abstract ArrayListMultimap<Integer, Integer> getCoordinates();
abstract void setCoordinates(int i, int j);
}
And this is what I am passing into my shipSunk() method. I an using getters/setters to create my ships:
p1board.shipSunk(p1.getShips()); //player 1
p2board.shipSunk(p2.getShips()); //player 2
These seem to work but here's some code into these as well:
public class Player {
private String name;
private ShipDerived[] ships = new ShipDerived[5];
public Player(){
this.name = name;
this.ships = ships;
}
public String getName(){
return name;
}
public void setName(String x){
name = x;
}
public void setShips(){
int a = 0;
for(int i=5; i>=1;i--){
ShipDerived s = new ShipDerived("null", 0);
Array.set(ships, a, s);
a++;
}
ships[0].setType("carrier");
ships[0].setLength(5);
ships[1].setType("battleship");
ships[1].setLength(4);
ships[2].setType("destroyer");
ships[2].setLength(3);
ships[3].setType("submarine");
ships[3].setLength(3);
ships[4].setType("patrol boat");
ships[4].setLength(2);
}
public ShipDerived[] getShips(){
return ships;
}
You initialize this.coordinates twice. First as an inline field initializer and second in the constructor. The statement this.coordinates = getCoordinates(); does not make sense because the getter returns this.coordinates, so you effectively get this.coordinates = this.coordinates;
This shouldn't effect your issue, but my recommendation for easier debugging is to just set all fields that you can to final to avoid issues such as this and remove the superfluous call from the constructor.
Then I would investigate the ArrayListMultimap.create(); method, if there is any way that one returns null.
You have #Override annotation on getCoordinates() so I'm guessing your Ship class also have coordinates field. In shipSunk method you cast your object to Ship class so most likely it operate on field Ship.coordintes whis is null because you are initializing only DerivedShip.coordinates.
Check this for simple example of hiding fields: If you overwrite a field in a subclass of a class, the subclass has two fields with the same name(and different type)?
There are so many strange things in your code:
Why has the Ship class private fields if you don't provide access methods for those fields? Without accessor methods nobody can use those fields, so just delete them!
Why do the ShipDerived constructors initialize the coordinates and c2 fields if you already initialize them at the declaration?
Why does Player.setShips() use some obscure Array.set(ships, a, s); when ships[a] = s; would be sufficient?
Why do your constructors (for Ship, ShipDerived and Player) contain nonsense-code like this.type = type; (in ShipDeriveds default constructor) that seems important but does nothing?
Why does the Player.setShips() method create empty ShipDerived instances and only afterwards sets their values?
After some cleanup your classes could look like:
Ship.java:
import com.google.common.collect.ArrayListMultimap;
public abstract class Ship {
Ship(){
}
abstract void setType(String t);
abstract void setLength(int l);
abstract String getType();
abstract int getLength();
abstract ArrayListMultimap<Integer, Integer> getCoordinates();
abstract void setCoordinates(int i, int j);
}
ShipDerived.java:
import java.util.ArrayList;
import com.google.common.collect.ArrayListMultimap;
public class ShipDerived extends Ship{
private String type;
private int length;
private ArrayListMultimap<Integer, Integer> coordinates = ArrayListMultimap.create();
private ArrayList<Integer> c2 = new ArrayList<>();
public ShipDerived(){
}
public ShipDerived(String t, int l){
this.type = t;
this.length = l;
}
#Override
void setType(String t) {
type = t;
}
#Override
void setLength(int l) {
length = l;
}
#Override
String getType() {
return type;
}
#Override
int getLength() {
return length;
}
#Override
ArrayListMultimap<Integer, Integer> getCoordinates() {
return this.coordinates;
}
ArrayList<Integer> getCoordinatesList() {
return this.c2;
}
#Override
void setCoordinates(int i, int j) {
this.coordinates.put(i, j);
this.c2.add(i);
this.c2.add(j);
}
}
Player.java:
public class Player {
private String name;
private ShipDerived[] ships = new ShipDerived[5];
public Player(){
}
public String getName(){
return name;
}
public void setName(String x){
name = x;
}
public void setShips(){
ships[0] = new ShipDerived("carrier", 5);
ships[1] = new ShipDerived("battleship", 4);
ships[2] = new ShipDerived("destroyer", 3);
ships[3] = new ShipDerived("submarine", 3);
ships[4] = new ShipDerived("patrol boat", 2);
}
public ShipDerived[] getShips(){
return ships;
}
}
These changes might not yet solve your issue, but at least make your code easier to read and understand.
Actually, since the Ship class no longer contains any fields and has only abstract methods you could even turn it into an interface (but that would mean that your methods are now public instead of package private, which would mean that you would also need to declare them as public in ShipDerived).
Ship.java, interface version:
import com.google.common.collect.ArrayListMultimap;
public interface Ship {
void setType(String t);
void setLength(int l);
String getType();
int getLength();
ArrayListMultimap<Integer, Integer> getCoordinates();
void setCoordinates(int i, int j);
}

how to get a property type from an content object in a map

The next code is an adaptation of my code and I hope it can help you.
Order.java
public class Order {
...
private Long id = ...;
private Map<Integer, Item> items = new LinkedHashMap<Integer, Item>();
...
}
Item.java
public abstract class Item {
public abstract Object getValue();
public abstract void setValue(Object value);
}
ItemInt.java
public class ItemInt extends Item {
private Integer number;
#Override
public Integer getValue() {
return number;
}
#Override
public void setValue(Object value) {
number = (Integer) value;
}
}
ItemFloat.java
public class ItemFloat extends Item {
private Float number;
#Override
public Float getValue() {
return number;
}
#Override
public void setValue(Object value) {
number = (Float) value;
}
}
I'm trying to get the property type with the next string "items[2].value"and it doesn't work. How can I make it? The results would be int or float.
Order order = ...;
....
final Class<?> clazz = new PropertyUtilsBean().getPropertyType(order, "items[2].value");
Also, I have to access dynamically to other kind of objects with the same method. For example:
final Class<?> clazz = new PropertyUtilsBean().getPropertyType(order, "id");
My real problem is how to build this String to access to content object in a map.
Hope this helps
public class Test {
Map<Integer, Item> items = new LinkedHashMap<Integer, Item>();
// HashMap have method values(), but not property values.
public List<Item> getValues() {
return new ArrayList<Item>(items.values());
}
public abstract class Item {
public abstract Object getValue();
public abstract void setValue(Object value);
}
public class ItemInt extends Item {
private Integer value;
public Integer getValue() {
return value;
}
public void setValue(Object value) {
this.value = (Integer) value;
}
}
public class ItemFloat extends Item {
private Float value;
public Float getValue() {
return value;
}
public void setValue(Object value) {
this.value = (Float) value;
}
}
public Test() {
ItemInt value = new ItemInt();
value.setValue(1);
items.put(0, value);
ItemFloat itemFloat = new ItemFloat();
itemFloat.setValue(4f);
items.put(1, itemFloat);
}
public static void main(String[] args) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
Test test = new Test();
Object property = new PropertyUtilsBean().getProperty(test, "values[0].value");
System.err.println("" + property.getClass());
}
}
Well, you have to do items.get(<value>) that will give you the item. However, that may be ItemInt or ItemFloat. So, this is how we can get the item:
Item item = items.get(123);
if(item instanceof ItemInt){
//do something
}else if(item instanceof ItemFloat){
//do something else
}
This way, we will be able to know the item type. Once the item type is known, we can cast the value in corresponding Object.
Alternatively, if we want to get the value directly from item (assuming that Item value will always be a number then, we can modify
public abstract Object getValue();
to
public abstract Number getValue();
This way, we can directly do item.getValue() and assign it to Number instance.
edited based on new/changed question
We can probably use a List instead of a map here as it automatically orders objects and I can't see the use of Key in the above example. So, the updated Order class will be:
public class Order {
...
private Long id = ...;
private List<Item> items = new ArrayList<Item>();
...
}
Now, to get the item value from an order, we can write a method like the one below:
public Number getItemValue(Order order, int index) throws IllegalArgumentException{
if(order.getItems().size() < index){
throw new IllegalArgumentException("Invalid index.");
}
return order.getItems().get(index-1).getValue();
}
We can change the return type to Object if values are not just numbers. Hope it helps.

Combine Two Similar Numeric Class Implementations

I have two classes which pretty much implement the same operations for two different numeric types (except for the getHexadecimalValue() method):
public class IntegerType
{
private int value;
public IntegerType()
{
value = 0;
}
public void setValue(int value)
{
this.value = value;
}
public int getValue()
{
return value;
}
public String getHexadecimalValue()
{
int integerValue = (int) getValue();
String hexadecimal = ValueConversions.toHexadecimal(integerValue);
return hexadecimal;
}
}
and
public class FloatingPointType
{
private float value;
public FloatingPointType()
{
value = 0;
}
public void setValue(float value)
{
this.value = value;
}
public float getValue()
{
return value;
}
public String getHexadecimalValue()
{
float floatingValue = (float) getValue();
int intBits = Float.floatToRawIntBits(floatingValue);
return ValueConversions.toHexadecimal(intBits);
}
}
I'm wondering what the best way would be to reduce this redundancy by e.g. defining a superclass called NumberType like this:
public abstract class NumberType
{
protected Number value;
public NumberType()
{
setValue(0);
}
public void setValue(Number value)
{
this.value = value;
}
public Number getValue()
{
return value;
}
public abstract String getHexadecimalValue();
}
Now the problem is that any number can be passed to my inheriting classes but I only want to accept ints and floats respectively while still keeping redundancy to a minimum:
public class IntegerType extends NumberType
{
#Override
public String getHexadecimalValue()
{
// Crashes on runtime if the value doesn't happen to be of the expected type
int integerValue = (int) getValue();
String hexadecimal = ValueConversions.toHexadecimal(integerValue);
return hexadecimal;
}
}
Can this be done by still keeping proper type checking?
You can try this way.
public abstract class NumberType<T extends Number> {
protected T value;
public NumberType(T value) {
this.value = value;
}
public void setValue(T value) {
this.value = value;
}
public T getValue() {
return value;
}
public abstract String getHexadecimalValue();
}
public class FloatingPointType extends NumberType<Float> {
public FloatingPointType() {
super(0f);
}
public String getHexadecimalValue() {
return ValueConversions.toHexadecimal(Float.floatToRawIntBits(value));
}
}
Note: Float and Integer, both class has static toHexString methods which you can directly use if you are comfortable to use them.
public static String toHexString(float f)
public static String toHexString(int i)
This can be done with overloading
for example:
public abstract class NumberType
{
private Number value;
public NumberType()
{
setValue(0);
}
public void setValue(float value)
{
this.value = value;
}
public void setValue(int value)
{
this.value = value;
}
public Number getValue()
{
return value;
}
public abstract String getHexadecimalValue();
}
You can also add then:
public int getIntValue()
{
return value.intValue();
}
public float getFloatValue()
{
return value.floatValue();
}
Ideally, setValue(Number value) must not allow entering any value but float in FloatingPointType and setValue(Number value) must not allow entering any value but int in IntegerType. You can check by using intValue() and floatValue() methods in class Number and throw exception if inappropriate value entered. Number class methods
It would be something like this in setValue(Number value) of IntegerType
if(value.intValue()!= value)
throw new IllegalArgumentException()

Is it possible to pass arguments into Enum values?

Suppose I have a Enum defined something like this:
public enum Sample{
// suppose AClass.getValue() returns an int
A(AClass.getValue()),
B(AClass.getValue()),
C(AClass.getValue());
private int _value;
private Sample(int _val){
this._value = _val;
}
public int getVal(){
return _value;
}
I can pull out values using Sample.A or Sample.A.getAVal() without issue.
Now suppose that AClass.getValue() could take a parameter to return a possibly different particular value, eg AClass.getValue(42).
It is possible to pass arguments to a public Enum method and retrive the Enum values? In other words, could I have an Enum definition like
public enum Sample{
// suppose AClass.getValue() returns an int
A(AClass.getAValue()),
B(AClass.getBValue()),
C(AClass.getCValue());
private int _value;
private Sample(int _val){
this._value = _val;
}
public int getVal(){
return _value;
}
public int getVal(int a){
// somehow pull out AClass.getAValue(a)
}
using Sample.A.getValue(42)?
You can do it, but only by making an abstract method in the enum, and overriding it in each value:
public enum Sample {
A(AClass.getAValue()) {
#Override public int getVal(int x) {
return AClass.getAValue(x);
}
},
B(BClass.getAValue()) {
#Override public int getVal(int x) {
return BClass.getBValue(x);
}
},
C(CClass.getAValue()) {
#Override public int getVal(int x) {
return CClass.getCValue(x);
}
};
private int _value;
private Sample(int _val){
this._value = _val;
}
public int getVal(){
return _value;
}
public abstract int getVal(int x);
}
Of course if you could create an instance of some other base type which has a getValue(int x) method, then you could put the code into the enum class itself instead of into the nested ones.
As stated in Java Specification
there is only one instance of each enum constant
So no, you can't have different values of a specific enum constant.
But you could put an array or a map inside your enum, so Sample.A.getValue(42) would return Sample.A.myMap.get(42) :
public enum Sample{
A(),
B(),
C();
Map<Integer, Integer> myMap = new HashMap<Integer, Integer>();
public int getVal(int i){
return myMap.get(i);
}
public int setVal(int i, int v){
return myMap.put(i, v);
}
}
public class App {
public static void main(String[] args) {
Fruit.setCounter(5);
System.out.println(Fruit.Apple.getCmd());
Fruit.setCounter(6);
System.out.println(Fruit.Apple.getCmd());
}
}
public enum Fruit {
Apple {
public String getCmd() {
return counter + " apples";
}
},
Banana {
public String getCmd() {
return counter + " bananas";
}
};
private static int counter = 0;
public abstract String getCmd();
public static void setCounter(int c) {
counter = c;
}
}
Output:
5 apples
6 apples

generics with subclass

I have three different types of parameters: int, float and long. I want to use an object to represent each of them. So i have one abstract class:
abstract public class AbstractProtocolParamObj<T extends Number>
{
public enum ProtocolParamConstraintTypeEnum
{
None,
OnOff,
Values,
ValueRange,
ValueRangeIncrement
}
protected String name;
protected ProtocolParamConstraintTypeEnum constraintValueType;
protected Vector<AbstractProtocolParamObj<T>> dependentParams;
protected Vector<AbstractProtocolParamObj<T>> constraintParams;
protected T value;
protected AbstractProtocolParamObj(String name,
ProtocolParamConstraintTypeEnum constraintValueType,
T value)
{
this.name = name;
this.constraintValueType = constraintValueType;
this.value = value;
}
public final String getName()
{
return name;
}
public final ProtocolParamConstraintTypeEnum getConstraintValueType()
{
return constraintValueType;
}
public void addDependentParam(AbstractProtocolParamObj<T> param)
{
if(dependentParams == null)
{
dependentParams = new Vector<AbstractProtocolParamObj<T>>();
}
dependentParams.add(param);
}
public void addConstraintParam(AbstractProtocolParamObj<T> param)
{
if(constraintParams == null)
{
constraintParams = new Vector<AbstractProtocolParamObj<T>>();
}
constraintParams.add(param);
}
public Vector<AbstractProtocolParamObj<T>> getDependentParams()
{
return dependentParams;
}
public Vector<AbstractProtocolParamObj<T>> getConstraintParams()
{
return constraintParams;
}
public T getValue()
{
return value;
}
public void setValue(T val)
{
value = val;
}
abstract public ReturnStatusEnum validate(T tempVal);
}
Then I will have one class for float parameters, one class for int and one for long. Like this:
public class ProtocolFloatParamObj extends AbstractProtocolParamObj
{
private float[] constraintVals;
private float maxVal;
private float minVal;
private float increment;
public ProtocolFloatParamObj(String name,
float value,
float[] constraintVals,
ProtocolParamConstraintTypeEnum constraintType
)
{
super(name, constraintType, value);
this.constraintVals = constraintVals;
}
public ProtocolFloatParamObj(String name,
float value,
float maxVal,
float minVal,
ProtocolParamConstraintTypeEnum constraintType
)
{
super(name, constraintType, value);
this.maxVal = maxVal;
this.minVal = minVal;
}
public ProtocolFloatParamObj(String name,
float value,
float maxVal,
float minVal,
float increment,
ProtocolParamConstraintTypeEnum constraintType
)
{
this(name, value, maxVal, minVal, constraintType);
this.increment = increment;
}
#Override
public ReturnStatusEnum validate(Number val)
{
ReturnStatusEnum status = ReturnStatusEnum.SUCCESS;
float tempVal = val.floatValue();
switch(constraintValueType)
{
case None:
{
break;
}
case OnOff:
{
break;
}
case Values:
{
break;
}
case ValueRange:
{
break;
}
case ValueRangeIncrement:
{
break;
}
}
return status;
}
}
Above code has no compile error but do has warnings which complain the generic type should be parameterized in subclass at the following lines:
public class ProtocolFloatParamObj extends AbstractProtocolParamObj
super(name, constraintType, value);
But if i change
public class ProtocolFloatParamObj extends AbstractProtocolParamObj
to
public class ProtocolFloatParamObj <T extends Number> extends AbstractProtocolParamObj<T>
and change the constructor value parameter from float to T. then everything looks good without compile error and warning.
The issue is because the ProtocolFloatParamObj constructor has a T parameter, its user/caller needs to define the T and it's easy to get warning or compile error.
For example in another class, I try to create a Vector contains some of those parameter objs but I cannot eliminate warnings or I cannot add to the objs vector:
public Vector<AbstractProtocolParamObj<T>> getAxialParamObjs()
{
Vector<AbstractProtocolParamObj<T>> objs = new Vector<AbstractProtocolParamObj<T>>();
ProtocolFloatParamObj<T> scanSpeed = new ProtocolFloatParamObj("scanSpeed",
new Float(Float.parseFloat(m_axialDefaultConfig.getProperty("scanSpeed"))),
new float[]{0.5f, 0.8f, 1.0f, 1.5f, 2.0f},
ProtocolParamConstraintTypeEnum.Values
);
objs.add(scanSpeed);
......
return objs;
}
It seems this is not a good idea or i need read more about java generic.
Do you have a better idea and do you have any advanced java generic tutorial links?
Try the following:
public class ProtocolFloatParamObj extends AbstractProtocolParamObj<Float>
Which should assign Float as the type parameter T of the super class.
Why not doing it like:
public class ProtocolFloatParamObj extends AbstractProtocolParamObj<Float>{
....
}
Change
AbstractProtocolParamObj<T> to AbstractProtocolParamObj<Float>
and change
ProtocolFloatParamObj <T extends Number> to only ProtocolFloatParamObj
resulting in
public class ProtocolFloatParamObj extends AbstractProtocolParamObj<Float>

Categories

Resources