/** * Checks whether there are any previous tokens that can be iterated to. * * @return true if there are previous tokens */ @Override public boolean hasPrevious() { checkTokenized(); return tokenPos > 0; }
/** * Checks whether there are any more tokens. * * @return true if there are more tokens */ @Override public boolean hasNext() { checkTokenized(); return tokenPos < tokens.length; }
/** * Gets the number of tokens found in the String. * * @return the number of matched tokens */ public int size() { checkTokenized(); return tokens.length; }
/** * Gets a copy of the full token list as an independent modifiable list. * * @return the tokens as a String array */ public List<String> getTokenList() { checkTokenized(); final List<String> list = new ArrayList<>(tokens.length); list.addAll(Arrays.asList(tokens)); return list; }
/** * Gets a copy of the full token list as an independent modifiable array. * * @return the tokens as a String array */ public String[] getTokenArray() { checkTokenized(); return tokens.clone(); }
/** * Checks whether there are any previous tokens that can be iterated to. * * @return true if there are previous tokens */ @Override public boolean hasPrevious() { checkTokenized(); return tokenPos > 0; }
/** * Checks whether there are any more tokens. * * @return true if there are more tokens */ @Override public boolean hasNext() { checkTokenized(); return tokenPos < tokens.length; }
/** * Gets the number of tokens found in the String. * * @return the number of matched tokens */ public int size() { checkTokenized(); return tokens.length; }
/** * Gets the number of tokens found in the String. * * @return the number of matched tokens */ public int size() { checkTokenized(); return tokens.length; }
/** * Gets the number of tokens found in the String. * * @return the number of matched tokens */ public int size() { checkTokenized(); return tokens.length; }
/** * Checks whether there are any more tokens. * * @return true if there are more tokens */ @Override public boolean hasNext() { checkTokenized(); return tokenPos < tokens.length; }
/** * Checks whether there are any previous tokens that can be iterated to. * * @return true if there are previous tokens */ @Override public boolean hasPrevious() { checkTokenized(); return tokenPos > 0; }
/** * Checks whether there are any more tokens. * * @return true if there are more tokens */ @Override public boolean hasNext() { checkTokenized(); return tokenPos < tokens.length; }
/** * Checks whether there are any previous tokens that can be iterated to. * * @return true if there are previous tokens */ @Override public boolean hasPrevious() { checkTokenized(); return tokenPos > 0; }
/** * Gets a copy of the full token list as an independent modifiable array. * * @return the tokens as a String array */ public String[] getTokenArray() { checkTokenized(); if (this.tokens == null) { return null; } final String[] clone = new String[this.tokens.length]; for (int i = 0; i < this.tokens.length; i++) { clone[i] = this.tokens[i]; } return clone; }
/** * Gets a copy of the full token list as an independent modifiable list. * * @return the tokens as a String array */ public List<String> getTokenList() { checkTokenized(); final List<String> list = new ArrayList<>(tokens.length); list.addAll(Arrays.asList(tokens)); return list; }
/** * Gets a copy of the full token list as an independent modifiable list. * * @return the tokens as a String array */ public List<String> getTokenList() { checkTokenized(); final List<String> list = new ArrayList<>(tokens.length); list.addAll(Arrays.asList(tokens)); return list; }
/** * Gets a copy of the full token list as an independent modifiable list. * * @return the tokens as a String array */ public List<String> getTokenList() { checkTokenized(); final List<String> list = new ArrayList<>(tokens.length); list.addAll(Arrays.asList(tokens)); return list; }
/** * Gets a copy of the full token list as an independent modifiable array. * * @return the tokens as a String array */ public String[] getTokenArray() { checkTokenized(); return tokens.clone(); }
/** * Gets a copy of the full token list as an independent modifiable array. * * @return the tokens as a String array */ public String[] getTokenArray() { checkTokenized(); return tokens.clone(); }