Home | History | Annotate | Download | only in util

Lines Matching refs:length

41     private int length;
56 public BitArray(int length) throws IllegalArgumentException {
57 if (length < 0) {
58 throw new IllegalArgumentException("Negative length for BitArray");
61 this.length = length;
63 repn = new byte[(length + BITS_PER_UNIT - 1)/BITS_PER_UNIT];
72 * 8*a.length <= length.
74 public BitArray(int length, byte[] a) throws IllegalArgumentException {
76 if (length < 0) {
77 throw new IllegalArgumentException("Negative length for BitArray");
79 if (a.length * BITS_PER_UNIT < length) {
81 "bit array of given length");
84 this.length = length;
86 int repLength = ((length + BITS_PER_UNIT - 1)/BITS_PER_UNIT);
87 int unusedBits = repLength*BITS_PER_UNIT - length;
107 length = bits.length;
108 repn = new byte[(length + 7)/8];
110 for (int i=0; i < length; i++) {
120 length = ba.length;
128 if (index < 0 || index >= length) {
140 if (index < 0 || index >= length) {
154 * Returns the length of this BitArray.
156 public int length() {
157 return length;
179 if (ba.length != length) return false;
181 for (int i = 0; i < repn.length; i += 1) {
191 boolean[] bits = new boolean[length];
193 for (int i=0; i < length; i++) {
207 for (int i = 0; i < repn.length; i++)
210 return hashCode ^ length;
246 for (int i = 0; i < repn.length - 1; i++) {
258 for (int i = BITS_PER_UNIT * (repn.length - 1); i < length; i++) {
267 for (int i=length-1; i>=0; i--) {