|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.amino.alg.scan.AbstractScanner
public abstract class AbstractScanner
Abstract class for searching byte arrays.
Constructor Summary | |
---|---|
AbstractScanner()
|
Method Summary | |
---|---|
int |
binarySearch(byte[] a,
byte v)
|
int[] |
findAll(byte[] a,
byte v)
Find the indices of all occurrences of the given value in the array. |
int[] |
findAll(byte[] a,
byte[] v)
Find the index of the any occurrence of the given sequence in the array. |
int |
findAny(byte[] a,
byte v)
Find the index of the any occurrence of the given value in the array. |
int |
findAny(byte[] a,
byte[] v)
Find the index of the any occurrence of the given sequence in the array. |
int |
findFirst(byte[] a,
byte v)
Find the index of the first occurrence of the given value in the array. |
int |
findFirst(byte[] a,
byte[] v)
Find the index of the first occurrence of the given sequence in the array. |
int |
findLast(byte[] a,
byte v)
Find the index of the last occurrence of the given value in the array. |
int |
findLast(byte[] a,
byte[] v)
Find the index of the last occurrence of the given sequence in the array. |
int |
replaceAll(byte[] a,
byte[] v,
byte[] r)
Replace all occurrences of the search sequence with the replacement sequence. |
int |
replaceAll(byte[] a,
byte v,
byte r)
Replace all occurrences of the search value with the replacement value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.amino.alg.scan.Scanner |
---|
binarySearch, findAll, findAll, findAny, findAny, findNext, findNext, findPrevious, findPrevious, replaceAll, replaceAll |
Constructor Detail |
---|
public AbstractScanner()
Method Detail |
---|
public int binarySearch(byte[] a, byte v)
binarySearch
in interface Scanner
a
- The array to search.v
- The value to search for
public int[] findAll(byte[] a, byte v)
findAll
in interface Scanner
a
- The array to search.v
- The value to search for.
public int[] findAll(byte[] a, byte[] v)
findAll
in interface Scanner
a
- The array to search.v
- The sequence to search for.
public int findAny(byte[] a, byte v)
findAny
in interface Scanner
a
- The array to search.v
- The value to search for.
public int findAny(byte[] a, byte[] v)
findAny
in interface Scanner
a
- The array to search.v
- The sequence to search for.
public int findFirst(byte[] a, byte v)
findFirst
in interface Scanner
a
- The array to search.v
- The value to search for.
public int findFirst(byte[] a, byte[] v)
findFirst
in interface Scanner
a
- The array to search.v
- The sequence to search for.
public int findLast(byte[] a, byte v)
findLast
in interface Scanner
a
- The array to search.v
- The value to search for.
public int findLast(byte[] a, byte[] v)
findLast
in interface Scanner
a
- The array to search.v
- The sequence to search for.
public int replaceAll(byte[] a, byte v, byte r)
replaceAll
in interface Scanner
a
- The array to search.v
- The value to search for.r
- The replacement value.
public int replaceAll(byte[] a, byte[] v, byte[] r)
replaceAll
in interface Scanner
a
- The array to search.v
- The sequence to search for.r
- The replacement sequence.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |