Code example for BitSet

Methods: clone

0
     
    /** 
     * Constructor 
     */ 
    public GABitSet () { 
      m_chromosome = new BitSet();
    } 
 
    /** 
     * makes a copy of this GABitSet 
     * @return a copy of the object 
     * @throws CloneNotSupportedException if something goes wrong 
     */ 
    public Object clone() throws CloneNotSupportedException {
      GABitSet temp = new GABitSet();
       
      temp.setObjective(this.getObjective());
      temp.setFitness(this.getFitness());
      temp.setChromosome((BitSet)(this.m_chromosome.clone()));
      return temp;
      //return super.clone(); 
    } 
 
    /**