Determines if leaf represents a possible range of values (bounded or unbounded)
343333
public static boolean isRangeLeaf(Leaf leaf) {
        return leaf instanceof RangeLeaf || leaf instanceof GreaterThanEqualsLeaf || leaf instanceof GreaterThanLeaf ||
                leaf instanceof LessThanLeaf || leaf instanceof LessThanEqualsLeaf;
    }
401579
function isEffectivelyContained(node, range) {
        if (range.collapsed) {
            return false;
        }

        // "node is contained in range."
        if (isContained(node, range)) {
            return true;
        }

        var sc = range.startContainer, so = range.startOffset;
        var ec = range.endContainer, eo = range.endOffset;

        // "node is range's start node, it is a Text node, its length is different
        // from range's start offset."
        var isCharData = dom.isCharacterDataNode(node);
        if (node == sc && isCharData && dom.getNodeLength(node) != so) {
            return true;
        }

        // "node is range's end node, it is a Text node, range's end offset is not
        // 0."
        if (node == ec && isCharData && eo != 0) {
            return true;
        }

        // "node has at least one child; and all its children are effectively
        // contained in range; and either range's start node is not a descendant of
        // node or is not a Text node or range's start offset is zero or range is
        // collapsed; and either range's end node is not a descendant of node or is
        // not a Text node or range's end offset is its end node's length."
        var children = node.childNodes, childCount = children.length;
        if (childCount != 0) {
            for (var i = 0; i < childCount; ++i) {
                if (!isEffectivelyContained(children[i], range)) {
                    return false;
                }
            }
            if ((!dom.isAncestorOf(node, sc) || sc.nodeType != 3 || so == 0)
                    && (!dom.isAncestorOf(node, ec) || ec.nodeType != 3 || eo == dom.getNodeLength(ec))) {
                return true;
            }
        }
        return false;
    }
318450
def _range_check(self, value, min_value, max_value):
        '''
        
        '''
        if value < min_value or value > max_value:
            raise ValueError('%s out of range - %s is not between %s and %s' % (self.__class__.__name__, value, min_value, max_value))
372899
function isContained(node, range) {
	var pos1 = getPosition(node, 0, range.startContainer, range.startOffset);
	var pos2 = getPosition(node, getNodeLength(node), range.endContainer, range.endOffset);

	return getFurthestAncestor(node) == getFurthestAncestor(range.startContainer)
		&& pos1 == "after"
		&& pos2 == "before";
}
131114
public boolean isInsideBounds(int x, int y)
	{
		if (!isVisible())
			return false;
		int sx = screenPosition().x();
		int sy = screenPosition().y();
		return x >= sx && x <= sx + size().width() && y >= sy && y <= sy + size().height();
	}
1219586
function(bounds, x, y)
	{
		return (bounds.x <= x && bounds.x + bounds.width >= x &&
				bounds.y <= y && bounds.y + bounds.height >= y);
	}
573176
private static void checkBoundaries(final RangeConfig rc) throws RangeException {
        if (rc.isNegativeInfinity()) {
            // No other checks necessary. Negative infinity is less than any
            // number
            return;
        }

        if (rc.isPositiveInfinity()) {
            // No other checks necessary. Positive infinity is greater than any
            // number
            return;
        }

        if (rc.getLeftBoundary().compareTo(rc.getRightBoundary()) > 0) {
            throw new RangeException("Left boundary must be less than right boundary (left:" + rc.getLeftBoundary() + ", right:"
                    + rc.getRightBoundary() + ")");
        }
    }
174139
private static boolean canBeNewCurrInterval(Bound<?> lastBound, Bound<?> currentBound) {
        int vCompare = BoundValueComparator.compareValueDispatchingToInf(lastBound, currentBound);
        if (vCompare != 0) {
            return true;
        } else {
            if (lastBound.isLowerBound() && currentBound.isUpperBound()) {
                return true;
            } else if (lastBound.isUpperBound() && lastBound.getBoundaryType() == RangeBoundary.OPEN 
                && currentBound.isLowerBound() && currentBound.getBoundaryType() == RangeBoundary.OPEN) {
                return true; // the case x) (x
            } else {
                return false;
            }
        }
    }
1007926
function(bounds) {
        var equals = false;
        if (bounds != null) {
            equals = ((this.left == bounds.left) && 
                      (this.right == bounds.right) &&
                      (this.top == bounds.top) && 
                      (this.bottom == bounds.bottom));
        }
        return equals;
    }
424928
private boolean isValueOutOfRange(final Double value) {
        return value == null || getMinValue() != Double.NEGATIVE_INFINITY && value < getMinValue()
                || getMaxValue() != Double.POSITIVE_INFINITY && value > getMaxValue();
    }
975144
def is_list(node):
    """"""
    return (isinstance(node, Node)
            and len(node.children) > 1
            and isinstance(node.children[0], Leaf)
            and isinstance(node.children[-1], Leaf)
            and node.children[0].value == u"["
            and node.children[-1].value == u"]")
1276064
private boolean isWithinRange(T value) {
        if (getMinInclusive() != null
                && compareTo(getMinInclusive(), value) > 0) {
            return false;
        }
        if (getMaxInclusive() != null
                && compareTo(getMaxInclusive(), value) < 0) {
            return false;
        }
        return true;
    }
1254815
def _in_range_inclusive(cls, val, **kwargs):
        '''
        
        '''
        minimum = kwargs.get('min', 0)
        maximum = kwargs.get('max', 1)
        zero_value = kwargs.get('zero_value', 0)

        if isinstance(val, six.string_types):
            if val.lower() == 'not defined':
                return True
            else:
                try:
                    val = int(val)
                except ValueError:
                    return False
        if val is not None:
            if minimum <= val <= maximum or val == zero_value:
                return True
            else:
                return False
        else:
            return False
311884
def is_run_as_leaf(self, **kwargs):
        """"""
        # find the last subassistant_N
        i = 0
        while i < len(kwargs):  # len(kwargs) is maximum of subassistant_N keys
            if settings.SUBASSISTANT_N_STRING.format(i) in kwargs:
                leaf_name = kwargs[settings.SUBASSISTANT_N_STRING.format(i)]
            i += 1

        return self.name == leaf_name
303434
private int[] checkBoundaries(int[] minMax, int[] dim) {
        if (minMax[0] < 0) {
            minMax[0] = 0;
        }
        if (minMax[1] > dim[0]) {
            minMax[1] = dim[0];
        }
        if (minMax[2] < 0) {
            minMax[2] = 0;
        }
        if (minMax[3] > dim[1]) {
            minMax[3] = dim[1];
        }
        if (minMax[4] < 0) {
            minMax[4] = 0;
        }
        if (minMax[5] > dim[2]) {
            minMax[5] = dim[2];
        }
        return minMax;
    }
841196
function isRangeAccess (node) {
      return node.type === 'MemberExpression' && node.property.type === 'Identifier' && node.property.name === 'range';
    }
511424
def isInfinite(self):
        """"""
        return self.x0 > self.x1 or self.y0 > self.y1