1 /*******************************************************************************
\r
2 * Copyright (c) 2010 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.databoard.binding.impl;
14 import org.simantics.databoard.binding.StringBinding;
\r
15 import org.simantics.databoard.binding.error.BindingException;
\r
16 import org.simantics.databoard.binding.error.UnsupportedOperationException;
\r
17 import org.simantics.databoard.type.StringType;
\r
20 * StringBindingDefault is a binding to java.lang.String class.
\r
22 * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
\r
24 public class StringBindingDefault extends StringBinding {
26 public StringBindingDefault(StringType type) {
30 public Object create(String value)
35 public String getValue(Object o)
36 throws BindingException
41 public void setValue(Object o, String newValue)
42 throws BindingException
44 throw new UnsupportedOperationException("Cannot change the value of immutable java.lang.String");
48 public boolean isInstance(Object obj) {
49 return obj instanceof String;
53 public boolean isImmutable() {