Create an {@link ImmutableCheck} operation against {@code position}.

@param <T>
@param position
@return {@link ImmutableCheck}
192487
public static <T> ImmutableCheck<T> of(Position.Readable<T> position) {
        return new ImmutableCheck<>(position);
    }
1197549
public static TypeAnnotationPosition
        exceptionParameter(final List<TypePathEntry> location,
                           final JCLambda onLambda,
                           final int pos) {
        return new TypeAnnotationPosition(TargetType.EXCEPTION_PARAMETER, pos,
                                          Integer.MIN_VALUE, onLambda,
                                          Integer.MIN_VALUE, Integer.MIN_VALUE,
                                          location);
    }
1191353
private void addSubtreeToCheckingStateTracking(DefaultMutableTreeNode node) {
        TreeNode[] path = node.getPath();   
        TreePath tp = new TreePath(path);
        CheckedNode cn = new CheckedNode(false, node.getChildCount() > 0, false);
        nodesCheckingState.put(tp, cn);
        for (int i = 0 ; i < node.getChildCount() ; i++) {              
            addSubtreeToCheckingStateTracking((DefaultMutableTreeNode) tp.pathByAddingChild(node.getChildAt(i)).getLastPathComponent());
        }
    }
1106517
public static <T> Comparator<T> comparator(CheckedComparator<T> comparator) {
        return comparator(comparator, THROWABLE_TO_RUNTIME_EXCEPTION);
    }
80776
@Override
  public ImmutableList<E> subList(int fromIndex, int toIndex) {
    checkPositionIndexes(fromIndex, toIndex, size());
    int length = toIndex - fromIndex;
    if (length == size()) {
      return this;
    }
    switch (length) {
      case 0:
        return of();
      case 1:
        return of(get(fromIndex));
      default:
        return subListUnchecked(fromIndex, toIndex);
    }
  }
992457
public boolean setPosition(long position) {
		try {
			long fileSize = reader.length();
			if (fileSize > position) {
				reader.seek(position);
				return true;
			} 
			
			logger.logp(Level.SEVERE, className, "setPosition", "HPEL_OffsetBeyondFileSize", new Object[]{file, Long.valueOf(position), Long.valueOf(fileSize)});
			
		} catch (IOException ex) {
			logger.logp(Level.SEVERE, className, "setPosition", "HPEL_ErrorSettingFileOffset", new Object[]{file, Long.valueOf(position), ex.getMessage()});
			// Fall through to return false.
		}
		return false;
	}
363729
public void updatePosition(final BitfinexPosition position) {
		
		synchronized (positions) {
			// Replace position
			positions.removeIf(p -> p.getCurrencyPair() == position.getCurrencyPair());
			positions.add(position);
			positions.notifyAll();
		}
		
		notifyCallbacks(position);
	}
1052452
public Point getPoint(int position) {
        if (position<0 || position>=size()) throw new ArrayIndexOutOfBoundsException("Invalid position: " + position);
        return new Point(coordinates[0][position],coordinates[1][position]);
    }
399095
function(current, position) {

      var x, newNode, node, firstChild;

      // create a new node
      newNode = current.cloneNode(true);

      // create new node in mirror
      if (position == 'before') {

        // insert element
        current.parentNode.insertBefore(newNode, current);

      }

      // re-init sortable
      hashedit.setupSortable();

      return newNode;

    }
927943
@Override
    public boolean incrementAndCheckState(final Long increment) throws CircuitBreakingException {
        if (threshold == 0) {
            open();
        }

        final long used = this.used.addAndGet(increment);
        if (used > threshold) {
            open();
        }

        return checkState();
    }
1109962
public static <T> Position.Readable<T> readOnly(final Type type, final T value) {
        Validate.isTrue(TypeUtils.isInstance(value, type), "%s is not an instance of %s", value, Types.toString(type));
        return readOnly(type, () -> value);
    }
296517
public static <T> Position.Writable<T> writable(final Typed<T> typed, Consumer<T> consumer) {
        return writable(Validate.notNull(typed, "type").getType(), consumer);
    }
656032
private boolean performStateCheck(final int increment) {
        CheckIntervalData currentData;
        CheckIntervalData nextData;
        State currentState;

        do {
            final long time = now();
            currentState = state.get();
            currentData = checkIntervalData.get();
            nextData = nextCheckIntervalData(increment, currentData, currentState, time);
        } while (!updateCheckIntervalData(currentData, nextData));

        // This might cause a race condition if other changes happen in between!
        // Refer to the header comment!
        if (stateStrategy(currentState).isStateTransition(this, currentData, nextData)) {
            currentState = currentState.oppositeState();
            changeStateAndStartNewCheckInterval(currentState);
        }
        return !isOpen(currentState);
    }
987139
public static <T> Position.Writable<T> writable(final Typed<T> typed) {
        return writable(typed, noop());
    }
266234
final public void addPosition(int position) {
    if (tokenPosition == null) {
      tokenPosition = new MtasPosition(position);
    } else {
      tokenPosition.add(position);
    }
  }
696061
public static ParameterizedAnalyticsQuery parameterized(final String statement,
        final JsonArray positionalParams) {
        return new ParameterizedAnalyticsQuery(statement, positionalParams, null, null);
    }
225149
private ImmutableSubstitution<ImmutableTerm> computeLiftableSubstitution(
            ImmutableSubstitution<? extends ImmutableTerm> selectedSubstitution,
            Optional<Variable> rightProvenanceVariable, ImmutableSet<Variable> leftVariables) {

        ImmutableMap<Variable, ImmutableTerm> newMap;
        if (rightProvenanceVariable.isPresent()) {
            newMap = selectedSubstitution.getImmutableMap().entrySet().stream()
                    .filter(e -> !leftVariables.contains(e.getKey()))
                    .collect(ImmutableCollectors.toMap(
                            Map.Entry::getKey,
                            e -> transformRightSubstitutionValue(e.getValue(), leftVariables,
                                    rightProvenanceVariable.get())));
        }
        else {
            newMap = selectedSubstitution.getImmutableMap().entrySet().stream()
                    .filter(e -> !leftVariables.contains(e.getKey()))
                    .collect(ImmutableCollectors.toMap(
                            Map.Entry::getKey,
                            e -> (ImmutableTerm) e.getValue()));
        }

        return substitutionFactory.getSubstitution(newMap);
    }