コード例 #1
0
 /**
  * Locate the index that contains the specified object.
  */
 internal int indexOf(Object obj, int index)
 {
     if (getLeftSubTree() != null)
     {
         int result = left.indexOf(obj, index + left.relativePosition);
         if (result != -1)
         {
             return(result);
         }
     }
     if (value == null ? value == obj : value.equals(obj))
     {
         return(index);
     }
     if (getRightSubTree() != null)
     {
         return(right.indexOf(obj, index + right.relativePosition));
     }
     return(-1);
 }