--------------------------
 This is an SVI property.
 <state> private-vlan mapping <range>  # ex. range = ['2-4,9']
 Always returns an array.
551756
def pvlan_mapping
      range = config_get('interface', 'pvlan_mapping', name: @name)
      return default_pvlan_mapping if range.nil?
      range.empty? ? range : [range.delete(' ')]
    end
62745
function (arr) {
		var res = [];
		for (var i = 0; i < arr.length; i++) {
			res[i] = this._v(arr[i]);
		}
		return res;
	}
476168
@Override
	public IPv4Address[] spanWithPrefixBlocks() {
		if(isSequential()) {
			return spanWithPrefixBlocks(this);
		}
		@SuppressWarnings("unchecked")
		ArrayList<IPv4Address> list = (ArrayList<IPv4Address>) spanWithBlocks(true);
		return list.toArray(new IPv4Address[list.size()]);
	}
471439
@SuppressWarnings("unchecked")
    public static List<Short> getAt(short[] array, Range range) {
        return primitiveArrayGet(array, range);
    }
758337
public double[] getRangeForBin(int binIndex) {
		if (binIndex >=0 && binIndex < ranges.length) 
			return new double[] { ranges[binIndex], ranges[binIndex + 1] };
		return null;
	}
407763
private static List<Integer> parseRange(String range, int max) {
        List<Integer> idx = new ArrayList<Integer>();
        String[] n = range.split(",");
        for (String s : n) {
            String[] d = s.split("-");
            int mi = Integer.parseInt(d[0]);
            if (mi < 0 || mi >= max) {
                throw new IllegalArgumentException(range);
            }
            if (d.length == 2) {
                if (d[1].equals("*")) {
                    d[1] = Integer.toString(max - 1);
                }
                int ma = Integer.parseInt(d[1]);
                if (ma <= mi || ma >= max || ma < 0) {
                    throw new IllegalArgumentException(range);
                }
                for (int i = mi; i <= ma; i++) {
                    idx.add(i);
                }
            } else {
                idx.add(mi);
            }
        }
        return idx;
    }
1028045
function xrange(n, exception) {
              var range = [];
              for (var i = 0; i < n; i++) {
                if (i !== exception) {
                  range.push(i);
                }
              }
              return range;
            }
345776
def switchport_pvlan_mapping_remove?(should_primary)
      is_primary, is_range = switchport_pvlan_mapping

      if (is_primary != should_primary) && !is_primary.nil?
        cli_error_check(
          config_set('interface', 'switchport_pvlan_mapping',
                     name: @name, state: 'no', primary: '', vlan: ''))
        is_range = []
      end
      is_range
    end
1146928
public boolean inRange(InetAddress ip) throws FilterException {
        Iterator iter = ranges.iterator();
        while (iter.hasNext()) {
            IPAddressRange range = (IPAddressRange) iter.next();
            if (range.inRange(ip)) {
                return true;
            }
        }

        return false;
    }
1136570
def _get_vlan_list(self, vlan_str):
        

        result = set()
        for splitted_vlan in vlan_str.split(","):
            if "-" not in splitted_vlan:
                if validate_vlan_number(splitted_vlan):
                    result.add(int(splitted_vlan))
                else:
                    raise Exception(self.__class__.__name__, "Wrong VLAN number detected {}".format(splitted_vlan))
            else:
                if self.IS_VLAN_RANGE_SUPPORTED:
                    if validate_vlan_range(splitted_vlan):
                        result.add(splitted_vlan)
                    else:
                        raise Exception(self.__class__.__name__, "Wrong VLANs range detected {}".format(vlan_str))
                else:
                    start, end = map(int, splitted_vlan.split("-"))
                    if validate_vlan_number(start) and validate_vlan_number(end):
                        if start > end:
                            start, end = end, start
                        for vlan in range(start, end + 1):
                            result.add(vlan)
                    else:
                        raise Exception(self.__class__.__name__, "Wrong VLANs range detected {}".format(vlan_str))

        return map(str, list(result))
201317
public List<InetAddress> getEndpoint(Range<Token> range)
    {
        return (List<InetAddress>) rangeMap.get(range);
    }
1252479
@SuppressWarnings("unchecked")
    public static List<Double> getAt(double[] array, ObjectRange range) {
        return primitiveArrayGet(array, range);
    }
1109648
def result
      result = []

      @ranges.each do |r|

        if r.instance_of?(Fixnum) || r.instance_of?(String)
          result << _result(r.to_s)
          next
        end

        unless r.instance_of?(Range)
          @logger.error("Illigal number #{r}")
          next
        end

        r.each do |n|
          runner = _result(n.to_s)
          unless runner.nil?
            result << runner
          end
        end
      end

      return result.compact
    end
877760
@SuppressWarnings("unchecked")
    public static List<Integer> getAt(int[] array, ObjectRange range) {
        return primitiveArrayGet(array, range);
    }
491552
def ip_to_array(ipaddress):
    """"""
    res = []
    for i in ipaddress.split("."):
        res.append(int(i))

    assert len(res) == 4
    return res
434455
function getPropertyArrayFromObjArray(arrayObj, property) {
  let temp = [];

  for (let i = 0; i < arrayObj.length; ++i) {
    temp.push(arrayObj[i][property]);
  }
  return temp;
}
778050
function encode_range(cs/*:CellAddrSpec|Range*/,ce/*:?CellAddrSpec*/)/*:string*/ {
	if(typeof ce === 'undefined' || typeof ce === 'number') {
/*:: if(!(cs instanceof Range)) throw "unreachable"; */
		return encode_range(cs.s, cs.e);
	}
/*:: if((cs instanceof Range)) throw "unreachable"; */
	if(typeof cs !== 'string') cs = encode_cell((cs/*:any*/));
	if(typeof ce !== 'string') ce = encode_cell((ce/*:any*/));
/*:: if(typeof cs !== 'string') throw "unreachable"; */
/*:: if(typeof ce !== 'string') throw "unreachable"; */
	return cs == ce ? cs : cs + ":" + ce;
}