コード例 #1
0
ファイル: ByteList.java プロジェクト: a2800276/primitive
 public boolean addAll(int index, ByteList list) {
   checkIndex(index);
   ensureCapacity(list.size());
   int toMove = this.size() - index;
   System.arraycopy(
       this.underlyingArray, index, this.underlyingArray, index + list.size(), toMove);
   System.arraycopy(list.underlyingArray, 0, this.underlyingArray, index, list.size());
   this.pos += list.size();
   return true;
 }
コード例 #2
0
ファイル: ByteList.java プロジェクト: a2800276/primitive
 public boolean containsAll(ByteList c) {
   for (int i = 0; i != c.size(); ++i) {
     if (!this.contains(c.get(i))) {
       return false;
     }
   }
   return true;
 }
コード例 #3
0
ファイル: ByteList.java プロジェクト: a2800276/primitive
 public boolean removeAll(ByteList list) {
   boolean removed = false;
   for (int i = 0; i != list.size(); ++i) {
     byte val = list.get(i);
     while (this.remove(val)) {
       removed = true;
     }
   }
   return removed;
 }
コード例 #4
0
 public boolean equals(Object that) {
   if (this == that) {
     return true;
   } else if (that instanceof ByteList) {
     ByteList thatList = (ByteList) that;
     if (size() != thatList.size()) {
       return false;
     }
     for (ByteIterator thatIter = thatList.iterator(), thisIter = iterator();
         thisIter.hasNext(); ) {
       if (thisIter.next() != thatIter.next()) {
         return false;
       }
     }
     return true;
   } else {
     return false;
   }
 }
コード例 #5
0
/*     */     public boolean addAll(long index, ByteList l) {
/* 588 */       ensureIndex(index);
/* 589 */       this.to += l.size();
/*     */ 
/* 595 */       return this.l.addAll(this.from + index, l);
/*     */     }
コード例 #6
0
ファイル: ByteList.java プロジェクト: a2800276/primitive
 public boolean addAll(ByteList list) {
   ensureCapacity(list.size());
   System.arraycopy(list.underlyingArray, 0, this.underlyingArray, this.size(), list.size());
   this.pos += list.size();
   return true;
 }
コード例 #7
0
ファイル: ByteList.java プロジェクト: a2800276/primitive
 boolean hasNext() {
   return this.pos < list.size();
 }