/*
 * Copyright 2004-2009 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.ui.binding;

import java.util.ArrayList;
import java.util.List;

/**
 * Holds a user-entered value to bind to a model property.
 * @author Keith Donald
 * @see Binder#bind(List).
 */
public class UserValue {

	private String property;

	private Object value;
	
	/**
	 * Create a new user value
	 * @param property the property associated with the value
	 * @param value the actual user-entered value
	 */
	public UserValue(String property, Object value) {
		this.property = property;
		this.value = value;
	}
	
	/**
	 * The property the user-entered value should bind to.
	 */
	public String getProperty() {
		return property;
	}

	/**
	 * The actual user-entered value.
	 */
	public Object getValue() {
		return value;
	}
	
	/**
	 * Is the user-entered value a String?
	 */
	public boolean isString() {
		return value instanceof String;
	}

	/**
	 * Is the user-entered value a String[]?
	 */
	public boolean isStringArray() {
		return value instanceof String[];
	}

	/**
	 * Creates a new UserValue list with a single element.
	 * @param property the property
	 * @param value the actual user-entered value
	 * @return the singleton user value list
	 */
	public static List<UserValue> single(String property, Object value) {
		List<UserValue> values = new ArrayList<UserValue>(1);
		values.add(new UserValue(property, value));
		return values;
	}
	
}

@@ -1371,251 +1371,8 @@
 %7D%0A%09%0A
-%09/**%0A%09 * Is the user-entered value a String?%0A%09 */%0A%09public boolean isString() %7B%0A%09%09return value instanceof String;%0A%09%7D%0A%0A%09/**%0A%09 * Is the user-entered value a String%5B%5D?%0A%09 */%0A%09public boolean isStringArray() %7B%0A%09%09return value instanceof String%5B%5D;%0A%09%7D%0A%0A
 %09/**

remove unused field