public final class CharacterRange extends AbstractRange<Character,Integer>
| Modifier and Type | Field and Description |
|---|---|
static BinaryFunction<Character,Character,Integer> |
DEFAULT_STEP
Calculate default step.
|
leftEndpoint, rightEndpoint, stepDEFAULT_LEFT_BOUND_TYPE, DEFAULT_RIGHT_BOUND_TYPE| Constructor and Description |
|---|
CharacterRange(char from,
BoundType leftBoundType,
char to,
BoundType rightBoundType)
Create a new CharacterRange.
|
CharacterRange(char from,
BoundType leftBoundType,
char to,
BoundType rightBoundType,
int step)
Create a new CharacterRange.
|
CharacterRange(char from,
char to)
Create a new CharacterRange.
|
CharacterRange(char from,
char to,
int step)
Create a new CharacterRange.
|
CharacterRange(Endpoint<Character> from,
Endpoint<Character> to)
Create a new CharacterRange.
|
CharacterRange(Endpoint<Character> from,
Endpoint<Character> to,
int step)
Create a new CharacterRange.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Character obj)
Returns
true if this range contains the specified element. |
protected Iterator<Character> |
createIterator()
Create a non-empty iterator.
|
containsAll, equals, getLeftEndpoint, getRightEndpoint, getStep, hashCode, isEmpty, iterator, toStringpublic static final BinaryFunction<Character,Character,Integer> DEFAULT_STEP
public CharacterRange(char from, char to)
from - startto - endpublic CharacterRange(char from, char to, int step)
from - startto - endstep - incrementpublic CharacterRange(Endpoint<Character> from, Endpoint<Character> to)
from - startto - endNullPointerException - if either Endpoint is nullpublic CharacterRange(Endpoint<Character> from, Endpoint<Character> to, int step)
from - startto - endstep - incrementNullPointerException - if either Endpoint is nullpublic CharacterRange(char from, BoundType leftBoundType, char to, BoundType rightBoundType)
from - startleftBoundType - type of left boundto - endrightBoundType - type of right boundNullPointerException - if either bound type is nullpublic CharacterRange(char from, BoundType leftBoundType, char to, BoundType rightBoundType, int step)
from - startleftBoundType - type of left boundto - endrightBoundType - type of right boundstep - incrementNullPointerException - if either bound type is nullpublic boolean contains(Character obj)
true if this range contains the specified element.obj - element whose presence is being tested in this rangetrue if this range contains the specified elementprotected Iterator<Character> createIterator()
createIterator in class AbstractRange<Character,Integer>Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.