Logo
Distributed Genetic Programming Framework
print print

File org.dgpf.gp.automaton.base.Conventions.java

Here you can find all the information about the file org.dgpf.gp.automaton.base.Conventions.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2005 Thomas Weise
 *
 * E-Mail           : tweise@gmx.de
 * Creation Date    : 2005-12-28 09:25:02
 * Original Filename: org.dgpf.automaton.base.Conventions.java
 * Version          : 2.2.1
 * Last modification: 2006-05-08
 *                by: Thomas Weise
 *
 * License          : GNU LESSER GENERAL PUBLIC LICENSE
 *                    Version 2.1, February 1999
 *                    You should have received a copy of this license along
 *                    with this library; if not, write to the Free Software
 *                    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *                    MA 02111-1307, USA or download the license under
 *                    http://www.gnu.org/copyleft/lesser.html.
 *
 * Warranty         : This software is provided "as is" without any
 *                    warranty; without even the implied warranty of
 *                    merchantability or fitness for a particular purpose.
 *                    See the Gnu Lesser General Public License for more
 *                    details.
 */


package org.dgpf.gp.automaton.base;


/**
 * This internal class defines the conventions which go for the data types
 * of the automaton simulator.
 * Internally, we use java-<code>int</code>s which allow us 32 bits of
 * insanity. How these are handled is defined in this class.
 * Some other automaton-concerning classes are derived from it, but you
 * should not override this class.
 *
 * @author Thomas Weise
 */

public abstract class Conventions
  {
/**
 * The integer representation of true. The automaton regards all non-zero
 * valued integers as being true, however, if you need to return a value
 * being specified as true, use this one.
 */

  public    static  final int     TRUE          = -1;
/**
 * The integer representation of false.
 */

  public    static  final int     FALSE         =  0;

/**
 * The label prefix.
 */

  protected static  final String  LABEL_PREFIX  = "@";

/**
 * This constant represents a calculative expression.
 */

  public    static  final int     CALCULATIVE_EXPR = 0;
/**
 * This constant represents an decisional expression.
 */

  public    static  final int     DECISIONAL_EXPR  = -1;

/**
 * This value will normally be returned by an instruction's
 * <code>execute()</code> method.
 */

  protected static  final int     RETURN          =  -1;
/**
 * The goto-string.
 */

  protected static  final String  GOTO             = "Goto " + LABEL_PREFIX;

/**
 * Create a conventions object.
 */

  protected Conventions ()
    {
    super();
    }


/**
 * Checks wether an integer argument evaluates to a positive (true) value.
 * @param p_arg   The integer argument to check.
 * @return  <code>true</code> if the arguments evaluates to a non-negative
 *          value.
 */

  public  static  final boolean is_true (final int p_arg)
    {
    return (p_arg != 0);
    }

/**
 * Checks wether an integer argument evaluates to a negative (false) value.
 * @param p_arg   The integer argument to check.
 * @return  <code>true</code> if the arguments evaluates to a negative
 *          value.
 */

  public  static  final boolean is_false (final int p_arg)
    {
    return (p_arg == 0);
    }
  }

File Information:

file name:Conventions.java
package:org.dgpf.gp.automaton.base
qualified name:org.dgpf.gp.automaton.base.Conventions.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/dgpf/gp/automaton/base/Conventions.java
size:3.237 KB (3315 B)
uploaded: 2015-07-22 04:10:55 GMT+0000
last update: 2006-05-08 13:38:44 GMT+0000
last access: 2017-11-19 04:50:09 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2015-07-22 04:10:53 GMT+0000 served at 2017-11-19 04:50:09 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo