예제 #1
0
 /**
  * Copy items from the given buffer to this buffer. The number of items copied is this buffer's
  * length or <TT>theSrc</TT>'s length, whichever is smaller. If <TT>theSrc</TT> is this buffer,
  * the <TT>copy()</TT> method does nothing.
  *
  * @param theSrc Source of items to copy into this buffer.
  * @exception ClassCastException (unchecked exception) Thrown if <TT>theSrc</TT>'s item data type
  *     is not the same as this buffer's item data type.
  */
 public void copy(Buf theSrc) {
   if (theSrc == this) {
   } else if (theSrc instanceof BooleanMatrixBuf) {
     BooleanMatrixBuf src = (BooleanMatrixBuf) theSrc;
     Arrays.copy(
         src.myMatrix,
         src.myRowRange,
         src.myColRange,
         this.myMatrix,
         this.myRowRange,
         this.myColRange);
   } else {
     BooleanBuf.defaultCopy((BooleanBuf) theSrc, this);
   }
 }
예제 #2
0
 /**
  * Copy items from the given buffer to this buffer. The number of items copied is this buffer's
  * length or <TT>theSrc</TT>'s length, whichever is smaller. If <TT>theSrc</TT> is this buffer,
  * the <TT>copy()</TT> method does nothing.
  *
  * @param theSrc Source of items to copy into this buffer.
  * @exception ClassCastException (unchecked exception) Thrown if <TT>theSrc</TT>'s item data type
  *     is not the same as this buffer's item data type.
  */
 public void copy(Buf theSrc) {
   if (theSrc == this) {
   } else if (theSrc instanceof CharacterMatrixBuf) {
     CharacterMatrixBuf src = (CharacterMatrixBuf) theSrc;
     Arrays.copy(
         src.myMatrix,
         src.myRowRange,
         src.myColRange,
         this.myMatrix,
         this.myRowRange,
         this.myColRange);
   } else {
     CharacterBuf.defaultCopy((CharacterBuf) theSrc, this);
   }
 }