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

org.ioc.commons.ui.impl.Field Maven / Gradle / Ivy

Go to download

Library which contains some extension classes for the library IOC-Commons. It provides some interface definitions and some tool classes which are non-dependent from the used technology; i.e. the classes and interfaces from this library do not depend on the choosen ioc-commons-implementation library.

There is a newer version: 1.2.1
Show newest version
package org.ioc.commons.ui.impl;

import org.ioc.commons.ui.IsWidget;

class Field {
	private final String fieldName;
	private final IsWidget fieldOwner;

	public Field(String fieldName, IsWidget fieldOwner) {
		this.fieldName = fieldName;
		this.fieldOwner = fieldOwner;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((fieldName == null) ? 0 : fieldName.hashCode());
		result = prime * result + ((fieldOwner == null) ? 0 : fieldOwner.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Field other = (Field) obj;
		if (fieldName == null) {
			if (other.fieldName != null)
				return false;
		} else if (!fieldName.equals(other.fieldName))
			return false;
		if (fieldOwner == null) {
			if (other.fieldOwner != null)
				return false;
		} else if (!fieldOwner.equals(other.fieldOwner))
			return false;
		return true;
	}

	public String getFieldName() {
		return fieldName;
	}

	public IsWidget getFieldOwner() {
		return fieldOwner;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy