JAGA Homepage

org.jaga.util
Class BitString

java.lang.Object
  extended by org.jaga.util.BitString

public class BitString
extends java.lang.Object

TODO: Complete these comments.

Project: JAGA - Java API for Genetic Algorithms.

Company: University College London and JAGA.Org (http://www.jaga.org).

Copyright: (c) 2004 by G. Paperin.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, ONLY if you include a note of the original author(s) in any redistributed/modified copy.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/gpl.html

Version:
JAGA public release 1.0 beta
Author:
Greg Paperin (greg@jaga.org)

Field Summary
private  int[] content
           
private  int length
           
 
Constructor Summary
private BitString()
           
  BitString(BitString toCopy)
           
  BitString(int length)
           
 
Method Summary
protected  void checkIndex(int index)
           
protected  int checkSubLength(int from, int to)
           
 java.lang.Object clone()
           
 void flip(int index)
           
 boolean get(int index)
           
 int getLength()
           
protected  boolean getUnchecked(int index)
           
 void set(int index, boolean value)
           
 void set(int from, int to, BitString values)
           
 void set(int from, int to, boolean value)
           
 void setUnchecked(int index, boolean value)
           
 BitString substring(int from, int to)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

length

private int length

content

private int[] content
Constructor Detail

BitString

private BitString()

BitString

public BitString(int length)

BitString

public BitString(BitString toCopy)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getLength

public int getLength()

substring

public BitString substring(int from,
                           int to)

get

public boolean get(int index)

getUnchecked

protected boolean getUnchecked(int index)

set

public void set(int index,
                boolean value)

setUnchecked

public void setUnchecked(int index,
                         boolean value)

set

public void set(int from,
                int to,
                boolean value)

set

public void set(int from,
                int to,
                BitString values)

flip

public void flip(int index)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

checkSubLength

protected int checkSubLength(int from,
                             int to)
                      throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

checkIndex

protected void checkIndex(int index)
                   throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

JAGA Homepage

Go to JAGA Homepage