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

com.github.javaclub.toolbox.Entry Maven / Gradle / Ivy

/*
 * @(#)Entry.java	2017年5月18日
 *
 * Copyright (c) 2017. All Rights Reserved.
 *
 */

package com.github.javaclub.toolbox;

import java.io.Serializable;

/**
 * Entry 一个节点数据
 *
 * @author Gerald Chen
 * @version $Id: Entry.java 2017年5月18日 10:55:18 Exp $
 */
public class Entry implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private K key;
	private V value;
	
	public Entry(K key, V value) {
		this.key = key;
		this.value = value;
	}

	public K getKey() {
		return key;
	}

	public void setKey(K key) {
		this.key = key;
	}

	public V getValue() {
		return value;
	}

	public void setValue(V value) {
		this.value = value;
	}
	
	public static  Entry create(K key, V value) {
		return new Entry(key, value);
	}
	
	@Override
	public String toString() {
		return String.valueOf(key + "=" + value);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy