Get a trimmed version of the array, i.e. without ending unset positions.

@return the trimmed array.
482855
public double[] getTrimmedInternalArray() {
        if (internalArray.length == lastIndex + 1) {
            return internalArray;
        }
        double[] newArray = new double[lastIndex + 1];
        System.arraycopy(internalArray, 0, newArray, 0, newArray.length);
        return newArray;
    }
677923
public String[][] getEdgeArray()
    {
        String[][] edge = new String[word.length + 1][word.length + 1];
        for (CoNLLWord coNLLWord : word)
        {
            edge[coNLLWord.ID][coNLLWord.HEAD.ID] = coNLLWord.DEPREL;
        }

        return edge;
    }
781535
public double[] toDoubleArray() {
    double[] copy = new double[size];
    for (int i = 0; i < size; i++) {
      copy[i] = elements[i];
    }
    return copy;
  }
1110873
public JcString trimLeft() {
		JcString ret = new JcString(null, this,
				new FunctionInstance(FUNCTION.String.LTRIM, 1));
		QueryRecorder.recordInvocationConditional(this, "trimLeft", ret);
		return ret;
	}
1267381
public FloatArray getEndings() {
    if (DocumentLine_Type.featOkTst && ((DocumentLine_Type)jcasType).casFeat_endings == null)
      jcasType.jcas.throwFeatMissing("endings", "ch.epfl.bbp.uima.types.DocumentLine");
    return (FloatArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((DocumentLine_Type)jcasType).casFeatCode_endings)));}
488005
function()  {
      var ranges = [],
          r = this.getRange(),
          tmpRanges;

      if (r) { ranges.push(r); }

      if (this.unselectableClass && this.contain && r) {
          var uneditables = this.getOwnUneditables(),
              tmpRange;
          if (uneditables.length > 0) {
            for (var i = 0, imax = uneditables.length; i < imax; i++) {
              tmpRanges = [];
              for (var j = 0, jmax = ranges.length; j < jmax; j++) {
                if (ranges[j]) {
                  switch (ranges[j].compareNode(uneditables[i])) {
                    case 2:
                      // all selection inside uneditable. remove
                    break;
                    case 3:
                      //section begins before and ends after uneditable. spilt
                      tmpRange = ranges[j].cloneRange();
                      tmpRange.setEndBefore(uneditables[i]);
                      tmpRanges.push(tmpRange);

                      tmpRange = ranges[j].cloneRange();
                      tmpRange.setStartAfter(uneditables[i]);
                      tmpRanges.push(tmpRange);
                    break;
                    default:
                      // in all other cases uneditable does not touch selection. dont modify
                      tmpRanges.push(ranges[j]);
                  }
                }
                ranges = tmpRanges;
              }
            }
          }
      }
      return ranges;
    }
1000662
public static function trim_array($array)
    {

        if (empty($array) || !is_array($array)) return $array;

        foreach ($array as $key => $value) {
            $array[$key] = trim($value);
        }

        unset($key, $value);

        return $array;
    }
119153
public Object[] getValuesArray() {
        this.assertIncorrectOrder();

        Object[] params = new Object[this.order.size()];

        String parameterName = null;
        for (int i = 0; i < this.order.size(); i++) {
            parameterName = this.getNameByPosition(i);

            params[i] = this.getValue(parameterName);
        }

        return params;
    }
40662
protected static String[] commaDelimitedListToStringArray(String commaDelimitedStrings) {
        return (commaDelimitedStrings == null || commaDelimitedStrings.length() == 0) ? new String[0] : commaSeparatedValuesPattern
            .split(commaDelimitedStrings);
    }
1346482
public byte[] getLastSegment() {
    if (segments.isEmpty()) {
      return null;
    }
    BufferSegment seg = segments.get(segments.size() - 1);
    return Arrays.copyOfRange(seg.buf, seg.offset, seg.offset + seg.len);
  }
785639
public Set<DetectorFactory> getUnpositionedMembers() {
        HashSet<DetectorFactory> result = new HashSet<>(memberSet);
        result.removeAll(orderedFactoryList);
        return result;
    }
1099591
public long[] toLongArray() {
    long[] copy = new long[size];
    for (int i = 0; i < size; i++) {
      copy[i] = elements[i];
    }
    return copy;
  }
812617
public ArrayList<Integer> getUnvisited() {
    if (0 == this.unvisitedCount) {
      return new ArrayList<Integer>();
    }
    ArrayList<Integer> res = new ArrayList<Integer>(this.unvisitedCount);
    for (int i = 0; i < this.registry.length; i++) {
      if (ZERO == this.registry[i]) {
        res.add(i);
      }
    }
    return res;
  }
293622
function () {
                var res = [];
                this._removeAllToArray(this._objectKeys, res);
                this._objectKeys = null;
                this._removeAllToArray(this._stringKeys, res);
                this._stringKeys = null;
                this._removeAllToArray(this._numberKeys, res);
                this._numberKeys = null;
                this._removeAllToArray(this._otherKeys, res);
                this._otherKeys = null;
                return res;
            }
71629
public AsciiString trim() {
        int start = arrayOffset(), last = arrayOffset() + length() - 1;
        int end = last;
        while (start <= end && value[start] <= ' ') {
            start++;
        }
        while (end >= start && value[end] <= ' ') {
            end--;
        }
        if (start == 0 && end == last) {
            return this;
        }
        return new AsciiString(value, start, end - start + 1, false);
    }
7295
@Override
    public FastStr trim() {
        char[] value = this.buf;
        int len = end;
        int st = begin;
        char[] val = value;    /* avoid getfield opcode */

        while ((st < len) && (val[st] <= ' ')) {
            st++;
        }
        while ((st < len) && (val[len - 1] <= ' ')) {
            len--;
        }
        return ((st > begin) || (len < size())) ? new FastStr(value, st, len) : this;
    }
67614
public String[] getItemsSelected() {
        List<String> selected = new LinkedList<>();
        for (int i = getIndexOffset(); i < listBox.getItemCount(); i++) {
            if (listBox.isItemSelected(i)) {
                selected.add(listBox.getValue(i));
            }
        }
        return selected.toArray(new String[selected.size()]);
    }