MCPcopy
hub / github.com/zxing/zxing / ECIInput

Interface ECIInput

core/src/main/java/com/google/zxing/common/ECIInput.java:24–107  ·  view source on GitHub ↗

Interface to navigate a sequence of ECIs and bytes. @author Alex Geller

Source from the content-addressed store, hash-verified

22 * @author Alex Geller
23 */
24public interface ECIInput {
25
26 /**
27 * Returns the length of this input. The length is the number
28 * of {@code byte}s in or ECIs in the sequence.
29 *
30 * @return the number of {@code char}s in this sequence
31 */
32 int length();
33
34 /**
35 * Returns the {@code byte} value at the specified index. An index ranges from zero
36 * to {@code length() - 1}. The first {@code byte} value of the sequence is at
37 * index zero, the next at index one, and so on, as for array
38 * indexing.
39 *
40 * @param index the index of the {@code byte} value to be returned
41 *
42 * @return the specified {@code byte} value as character or the FNC1 character
43 *
44 * @throws IndexOutOfBoundsException
45 * if the {@code index} argument is negative or not less than
46 * {@code length()}
47 * @throws IllegalArgumentException
48 * if the value at the {@code index} argument is an ECI (@see #isECI)
49 */
50 char charAt(int index);
51
52 /**
53 * Returns a {@code CharSequence} that is a subsequence of this sequence.
54 * The subsequence starts with the {@code char} value at the specified index and
55 * ends with the {@code char} value at index {@code end - 1}. The length
56 * (in {@code char}s) of the
57 * returned sequence is {@code end - start}, so if {@code start == end}
58 * then an empty sequence is returned.
59 *
60 * @param start the start index, inclusive
61 * @param end the end index, exclusive
62 *
63 * @return the specified subsequence
64 *
65 * @throws IndexOutOfBoundsException
66 * if {@code start} or {@code end} are negative,
67 * if {@code end} is greater than {@code length()},
68 * or if {@code start} is greater than {@code end}
69 * @throws IllegalArgumentException
70 * if a value in the range {@code start}-{@code end} is an ECI (@see #isECI)
71 */
72 CharSequence subSequence(int start, int end);
73
74 /**
75 * Determines if a value is an ECI
76 *
77 * @param index the index of the value
78 *
79 * @return true if the value at position {@code index} is an ECI
80 *
81 * @throws IndexOutOfBoundsException

Callers 36

encodeHighLevelMethod · 0.95
quoteHexMethod · 0.65
getMessageFieldMethod · 0.65
getMeCardMethod · 0.65
isBasicallyValidURIMethod · 0.65
assertStartsWithMethod · 0.65
assertEndsWithMethod · 0.65
encodeHighLevelMethod · 0.65
quoteHexMethod · 0.65
visualizeMethod · 0.65

Implementers 2

MinimalECIInputcore/src/main/java/com/google/zxing/co
NoECIInputcore/src/main/java/com/google/zxing/pd

Calls

no outgoing calls

Tested by

no test coverage detected