org.purplejrank.JrankPutFields Maven / Gradle / Ivy
package org.purplejrank;
import java.io.IOException;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream.PutField;
import java.util.HashMap;
import java.util.Map;
/**
* {@link PutField} for purple jrank
* @author robin
*
*/
public class JrankPutFields extends PutField {
private Map values = new HashMap();
Object get(String name) {
return values.get(name);
}
@Override
public void put(String name, boolean val) {
values.put(name, val);
}
@Override
public void put(String name, byte val) {
values.put(name, val);
}
@Override
public void put(String name, char val) {
values.put(name, val);
}
@Override
public void put(String name, short val) {
values.put(name, val);
}
@Override
public void put(String name, int val) {
values.put(name, val);
}
@Override
public void put(String name, long val) {
values.put(name, val);
}
@Override
public void put(String name, float val) {
values.put(name, val);
}
@Override
public void put(String name, double val) {
values.put(name, val);
}
@Override
public void put(String name, Object val) {
values.put(name, val);
}
@Deprecated
@Override
public final void write(ObjectOutput out) throws IOException {
throw new UnsupportedOperationException();
}
}