取整数某二进制位的值
@param number
@param pos 0开始
@return
339446
protected int getMaskValue(int number,int layout)
	{
//		int pos=maskLen*layout;
//		int pos=posCache[layout];
//		int mask=config.mask;
		return (number & (config.mask<<posCache[layout]))>>>posCache[layout];
	}
1103980
public void setPosition(int pos) {
		if (pos < 0 || pos >= number)
			throw new IllegalArgumentException("Position " + pos + " out of range");
		position = pos;
		updateLocationDefinition(position);
		forwardButton.setEnabled(position < number - 1);
		backwardButton.setEnabled(position > 0);
		if (panel.getParent()!=null) positionChanged();
	}
20612
public final long getBeUlong48(final int pos) {
        final int position = origin + pos;

        if (pos + 5 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
                                                                            + (pos < 0 ? pos : (pos + 5)));

        byte[] buf = buffer;
        return ((long) (0xff & buf[position + 5])) | ((long) (0xff & buf[position + 4]) << 8)
               | ((long) (0xff & buf[position + 3]) << 16) | ((long) (0xff & buf[position + 2]) << 24)
               | ((long) (0xff & buf[position + 1]) << 32) | ((long) (0xff & buf[position]) << 40);
    }
925006
public static long toLong(CharSequence seq, int pos, int length) {
    long n = 0;
    int i = pos;
    while (i < length) {
      char c = seq.charAt(i);
      if (c >= '0' && c <= '9') {
        n *= 10;
        n += (int)(c - '0');
      } else {
        break;
      }
      i++;
    }
    return n;
  }
358538
private void scanNumber(int pos, int radix) {
        // for octal, allow base-10 digit in case it's a float literal
        this.radix = radix;
        int digitRadix = (radix == 8 ? 10 : radix);
        int firstDigit = reader.digit(pos, Math.max(10, digitRadix));
        boolean seendigit = firstDigit >= 0;
        boolean seenValidDigit = firstDigit >= 0 && firstDigit < digitRadix;
        if (seendigit) {
            scanDigits(pos, digitRadix);
        }
        if (radix == 16 && reader.ch == '.') {
            scanHexFractionAndSuffix(pos, seendigit);
        } else if (seendigit && radix == 16 && (reader.ch == 'p' || reader.ch == 'P')) {
            scanHexExponentAndSuffix(pos);
        } else if (digitRadix == 10 && reader.ch == '.') {
            reader.putChar(true);
            scanFractionAndSuffix(pos);
        } else if (digitRadix == 10 &&
                   (reader.ch == 'e' || reader.ch == 'E' ||
                    reader.ch == 'f' || reader.ch == 'F' ||
                    reader.ch == 'd' || reader.ch == 'D')) {
            scanFractionAndSuffix(pos);
        } else {
            if (!seenValidDigit) {
                switch (radix) {
                case 2:
                    lexError(pos, "invalid.binary.number");
                    break;
                case 16:
                    lexError(pos, "invalid.hex.number");
                    break;
                }
            }
            if (reader.ch == 'l' || reader.ch == 'L') {
                reader.scanChar();
                tk = TokenKind.LONGLITERAL;
            } else {
                tk = TokenKind.INTLITERAL;
            }
        }
    }
453916
public Field getField(final int number) {
    final Field result = fields.get(number);
    return (result == null) ? Field.getDefaultInstance() : result;
  }
30066
public int set(int pos) {

        while (pos >= capacity) {
            doubleCapacity();
        }

        if (pos >= limitPos) {
            limitPos = pos + 1;
        }

        int windex = pos >> 5;
        int mask   = 0x80000000 >>> (pos & 0x1F);
        int word   = map[windex];
        int result = (word & mask) == 0 ? 0
                                        : 1;

        map[windex] = (word | mask);

        return result;
    }
467755
@Pure
	public Point1d getNearestPosition(Point2D<?, ?> pos) {
		Point2d pp = null;
		final Vector2d v = new Vector2d();
		double currentPosition = 0.;
		double bestPosition = Double.NaN;
		double bestDistance = Double.POSITIVE_INFINITY;
		for (final Point2d p : points()) {
			if (pp != null) {
				double position = Segment2afp.findsProjectedPointPointLine(
						pos.getX(), pos.getY(),
						pp.getX(), pp.getY(),
						p.getX(), p.getY());
				if (position < 0.) {
					position = 0.;
				}
				if (position > 1.) {
					position = 1.;
				}
				v.sub(p, pp);
				final double t = v.getLength();
				v.scale(position);
				final double dist = Point2D.getDistanceSquaredPointPoint(
						pos.getX(),
						pos.getY(),
						pp.getX() + v.getX(),
						pp.getY() + v.getY());
				if (dist < bestDistance) {
					bestDistance = dist;
					bestPosition = currentPosition + v.getLength();
				}
				currentPosition += t;
			}
			pp = p;
		}
		if (Double.isNaN(bestPosition)) {
			return null;
		}
		return new Point1d(toSegment1D(), bestPosition, 0.);
	}
791656
public boolean hasSameNumberAs(Number number) {
        checkNumber(number);
        try {
            return this.number == getInternalNumber(number, false);
        } catch (ArithmeticException e) {
            return false;
        }
    }
1235243
public final long getBeUlong56(final int pos) {
        final int position = origin + pos;

        if (pos + 6 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
                                                                            + (pos < 0 ? pos : (pos + 6)));

        byte[] buf = buffer;
        return ((long) (0xff & buf[position + 6])) | ((long) (0xff & buf[position + 5]) << 8)
               | ((long) (0xff & buf[position + 4]) << 16) | ((long) (0xff & buf[position + 3]) << 24)
               | ((long) (0xff & buf[position + 2]) << 32) | ((long) (0xff & buf[position + 1]) << 40)
               | ((long) (0xff & buf[position]) << 48);
    }
80419
protected int digit(int pos, int base) {
        char c = ch;
        if ('0' <= c && c <= '9')
            return Character.digit(c, base); //a fast common case
        int codePoint = peekSurrogates();
        int result = codePoint >= 0 ? Character.digit(codePoint, base) : Character.digit(c, base);
        if (result >= 0 && c > 0x7f) {
            log.error(pos + 1, "illegal.nonascii.digit");
            if (codePoint >= 0)
                scanChar();
            ch = "0123456789abcdef".charAt(result);
        }
        return result;
    }
653508
public final int getInt16(final int pos) {
        final int position = origin + pos;

        if (pos + 1 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
                                                                            + (pos < 0 ? pos : (pos + 1)));

        byte[] buf = buffer;
        return (0xff & buf[position]) | ((buf[position + 1]) << 8);
    }
1353546
public char setIndex(int pos) 
  { 
    if (pos < 0) {
      _pos = 0;
      return DONE;
    }
    else if (_length <= pos) {
      _pos = _length;
      return DONE;
    }
    else {
      _pos = pos; 
      return _string.charAt(pos);
    }
  }
1078225
public static String 
    trim( String string, int pos ) 
    {
        int len = string.length();

     	int leftPos = pos;
     	int rightPos = len;
     	
    	for( ; rightPos > 0; --rightPos ) 
    	{
    	    char ch = string.charAt( rightPos - 1 );
    		if( ch != ' '
    		    && ch != '\t' 
    		    && ch != '\n' 
    		    && ch != '\r' ) 
    		{    			
    			break;
    		}
    	}
    	
    	for( ; leftPos < rightPos; ++leftPos )
    	{
    	    char ch = string.charAt( leftPos ); 
    		if( ch != ' ' 
    		    && ch != '\t' 
    		    && ch != '\n' 
    		    && ch != '\r' ) 
    		{    			
    			break;
    		}
    	}
    	
    	if( rightPos <= leftPos ) 
    	{
    		return "";
    	}
    	
    	return ( leftPos == 0 && rightPos == string.length() )? string : 
    	                                                        string.substring( leftPos, rightPos );
    }
692428
private final static String basePhoneNumber(String number) throws ParseException {
		StringBuffer s = new StringBuffer();
		Lexer lexer = new Lexer("sip_urlLexer", number);
		
		int lc = 0;
		while (lexer.hasMoreChars()) {
			char w = lexer.lookAhead(0);
			if (Lexer.isDigit(w)
				|| w == '-'
				|| w == '.'
				|| w == '('
				|| w == ')') {
				lexer.consume(1);
				s.append(w);
				lc++;
			}
//				else if (lc > 0)
//					break;
			else
				throw new IllegalArgumentException("unexpected " + w + " in the phone number");
		}
		return s.toString();

	}
1181688
long getValueAtPosition(final int pos) {
    if (itemsSeen_ == 0) {
      throw new SketchesArgumentException("Requested element from empty reservoir.");
    } else if ((pos < 0) || (pos >= getNumSamples())) {
      throw new SketchesArgumentException("Requested position must be between 0 and "
          + (getNumSamples() - 1) + ", inclusive. Received: " + pos);
    }

    return data_[pos];
  }
1002024
@Nonnegative
  public int pos (@Nonnegative final int nNewPos)
  {
    ValueEnforcer.isBetweenInclusive (nNewPos, "NewPos", 0, m_aObjs.size ());
    final int nOldPos = m_nPos;
    m_nPos = nNewPos;
    return nOldPos;
  }