All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.purplejrank.JrankPutFields Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
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();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy