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

org.ujoframework.extensions.ValueTextable Maven / Gradle / Ivy

There is a newer version: 1.22
Show newest version
/*
 *  Copyright 2007-2010 Pavel Ponec
 *
 *  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.ujoframework.extensions;

/**
 * A special interface for a terminology only, an implementation is not reasnonable in the UJO Framework.
 * ValueTextable is every one object, wich have got implemented method toString() so that the result can be used
 * to restore a new equal object by its a single constructor parameter type of String.
 * 
This is a "ValueTextable" test for an Integer class: *
 *  Integer textable1 = new Integer(7);
 *  Integer textable2 = new Integer(textable1.toString());
 *  boolean result = textable1.equals(textable2);
 * 
*
Some completed ValueTextable classes from a Java API are *
    *
  • Boolean
  • *
  • Short
  • *
  • Integer
  • *
  • Long
  • *
  • Float
  • *
  • Double
  • *
  • String
  • *
* These classes have NOT behaviour of ValueTextable,
however UJO Framework supports these types similar like ValueTextable: *
    *
  • Byte
  • *
  • Character
  • *
  • java.util.Date
  • *
  • java.sql.Date (time 0:00:00.000)
  • *
  • byte[]
  • *
  • char[]
  • *
  • Locale
  • *
  • Color
  • *
  • Dimension
  • *
  • Rectangle
  • *
  • Enum
  • *
  • Class
  • *
  • Charset
  • *
  • List<some-type-above> with some restrictions for deserialization:
    * value property must be type of UjoPropertyList and * the serialized text must not contain a separator character comma ',' *
  • *
* * * @author Pavel Ponec * @see UjoTextable */ public interface ValueTextable { /** A result must be acceptable for one constructor parameter (of the same class) to restore an equal object. */ @Override public String toString(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy