Save This Page
Home » mahout-collections-1.0-src » org.apache.mahout.math » [javadoc | source]
    1   /**
    2    * Licensed to the Apache Software Foundation (ASF) under one
    3    * or more contributor license agreements. See the NOTICE file
    4    * distributed with this work for additional information
    5    * regarding copyright ownership. The ASF licenses this file
    6    * to you under the Apache License, Version 2.0 (the
    7    * "License"); you may not use this file except in compliance
    8    * with the License. You may obtain a copy of the License at
    9    *
   10    * http://www.apache.org/licenses/LICENSE-2.0
   11    *
   12    * Unless required by applicable law or agreed to in writing,
   13    * software distributed under the License is distributed on an
   14    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   15    * KIND, either express or implied. See the License for the
   16    * specific language governing permissions and limitations
   17    * under the License.
   18    */
   19   /*
   20   Copyright 1999 CERN - European Organization for Nuclear Research.
   21   Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose 
   22   is hereby granted without fee, provided that the above copyright notice appear in all copies and 
   23   that both that copyright notice and this permission notice appear in supporting documentation. 
   24   CERN makes no representations about the suitability of this software for any purpose. 
   25   It is provided "as is" without expressed or implied warranty.
   26   */
   27   package org.apache.mahout.math;
   28   
   29   /**
   30    * This empty class is the common root for all persistent capable classes.
   31    * If this class inherits from <tt>java.lang.Object</tt> then all subclasses are serializable with the standard Java serialization mechanism.
   32    * If this class inherits from <tt>com.objy.db.app.ooObj</tt> then all subclasses are <i>additionally</i> serializable with the Objectivity ODBMS persistance mechanism.
   33    * Thus, by modifying the inheritance of this class the entire tree of subclasses can be switched to Objectivity compatibility (and back) with minimum effort.
   34    */
   35   public abstract class PersistentObject implements java.io.Serializable, Cloneable {
   36   
   37     /** Not yet commented. */
   38     protected PersistentObject() {
   39     }
   40   
   41     /**
   42      * Returns a copy of the receiver. This default implementation does not nothing except making the otherwise
   43      * <tt>protected</tt> clone method <tt>public</tt>.
   44      *
   45      * @return a copy of the receiver.
   46      */
   47     @Override
   48     public Object clone() {
   49       try {
   50         return super.clone();
   51       } catch (CloneNotSupportedException exc) {
   52         throw new InternalError(); //should never happen since we are cloneable
   53       }
   54     }
   55   }

Save This Page
Home » mahout-collections-1.0-src » org.apache.mahout.math » [javadoc | source]