Returns the smallest prefix length possible such that this address division grouping includes the block of addresses for that prefix.

@return the prefix length
196579
@Override
	public int getMinPrefixLengthForBlock() {
		int count = getDivisionCount();
		int totalPrefix = getBitCount();
		for(int i = count - 1; i >= 0 ; i--) {
			AddressDivisionBase div = getDivision(i);
			int segBitCount = div.getBitCount();
			int segPrefix = div.getMinPrefixLengthForBlock();
			if(segPrefix == segBitCount) {
				break;
			} else {
				totalPrefix -= segBitCount;
				if(segPrefix != 0) {
					totalPrefix += segPrefix;
					break;
				}
			}
		}
		return totalPrefix;
	}
1041700
public IPv4AddressSection[] spanWithPrefixBlocks(IPv4AddressSection other) {
		return getSpanningPrefixBlocks(
				this,
				other,
				IPv4AddressSection::getLower,
				IPv4AddressSection::getUpper,
				Address.ADDRESS_LOW_VALUE_COMPARATOR::compare,
				IPv4AddressSection::assignPrefixForSingleBlock,
				IPv4AddressSection::withoutPrefixLength,
				getAddressCreator()::createSectionArray);
	}
34026
final int getMinLength() {
		switch (this.type) {
		case CONCAT:
			int sum = 0;
			for (int i = 0; i < this.size(); i++)
				sum += this.getChild(i).getMinLength();
			return sum;

		case CONDITION:
		case UNION:
			if (this.size() == 0)
				return 0;
			int ret = this.getChild(0).getMinLength();
			for (int i = 1; i < this.size(); i++) {
				int min = this.getChild(i).getMinLength();
				if (min < ret)
					ret = min;
			}
			return ret;

		case CLOSURE:
		case NONGREEDYCLOSURE:
			if (this.getMin() >= 0)
				return this.getMin() * this.getChild(0).getMinLength();
			return 0;

		case EMPTY:
		case ANCHOR:
			return 0;

		case DOT:
		case CHAR:
		case RANGE:
		case NRANGE:
			return 1;

		case INDEPENDENT:
		case PAREN:
		case MODIFIERGROUP:
			return this.getChild(0).getMinLength();

		case BACKREFERENCE:
			return 0; // *******

		case STRING:
			return this.getString().length();

		case LOOKAHEAD:
		case NEGATIVELOOKAHEAD:
		case LOOKBEHIND:
		case NEGATIVELOOKBEHIND:
			return 0; // ***** Really?

		default:
			throw new RuntimeException("Token#getMinLength(): Invalid Type: "
					+ this.type);
		}
	}
282968
public IPv6AddressSection[] mergeToPrefixBlocks(IPv6AddressSection ...sections) throws SizeMismatchException, AddressPositionException {
		for(int i = 0; i < sections.length; i++) {
			IPv6AddressSection section = sections[i];
			if(section.addressSegmentIndex != addressSegmentIndex) {
				throw new AddressPositionException(section, section.addressSegmentIndex, addressSegmentIndex);
			}
		}
		List<IPAddressSegmentSeries> blocks = getMergedPrefixBlocks(this, sections, true);
		return blocks.toArray(new IPv6AddressSection[blocks.size()]);
	}
795912
public int length() {
        int retval=0;
        for(int i=0; i < index; i++)
            retval+=length_visitor.applyAsInt(messages[i], this);
        return retval;
    }
879499
public int getLength() {
        return ownerLength + tableName.length() + quoteCharacter.getStartDelimiter().length() + quoteCharacter.getEndDelimiter().length();
    }
904621
public IPv6AddressSection[] spanWithPrefixBlocks(IPv6AddressSection other) throws AddressPositionException {
		if(other.addressSegmentIndex != addressSegmentIndex) {
			throw new AddressPositionException(other, other.addressSegmentIndex, addressSegmentIndex);
		}
		return getSpanningPrefixBlocks(
				this,
				other,
				IPv6AddressSection::getLower,
				IPv6AddressSection::getUpper,
				Address.ADDRESS_LOW_VALUE_COMPARATOR::compare,
				IPv6AddressSection::assignPrefixForSingleBlock,
				IPv6AddressSection::withoutPrefixLength,
				getAddressCreator()::createSectionArray);
	}
1283247
public final int getRemaining()
    {
        int rem = 0;
        for (int ii=0;ii<length;ii++)
        {
            rem += srcs[offset+ii].remaining();
        }
        return rem;
    }
558224
public int getLength()
  {

    // It is assumed that the getChildNodes call synchronized
    // the children. Therefore, we can access the first child
    // reference directly.
    int count = 0;

    for (ElemTemplateElement node = m_firstChild; node != null;
            node = node.m_nextSibling)
    {
      count++;
    }

    return count;
  }
11461
private static long getBlockSize(LocatedBlocks lbs) throws IOException {
    List<LocatedBlock> locatedBlocks = lbs.getLocatedBlocks();
    long bs = -1;
    for (LocatedBlock lb: locatedBlocks) {
      if (lb.getBlockSize() > bs) {
        bs = lb.getBlockSize();
      }
    }
    return bs;
  }
1059433
@Override
	public Iterator<? extends IPAddressSeqRange> prefixIterator(int prefixLength) {
		if(!isMultiple()) {
			return new Iterator<IPAddressSeqRange>() {
				IPAddressSeqRange orig = IPAddressSeqRange.this;

				@Override
				public boolean hasNext() {
					return orig != null;
				}

			    @Override
				public IPAddressSeqRange next() {
			    	if(orig == null) {
			    		throw new NoSuchElementException();
			    	}
			    	IPAddressSeqRange result = orig;
			    	orig = null;
			    	return result;
			    }
			
			    @Override
				public void remove() {
			    	throw new UnsupportedOperationException();
			    }
			};
		}
		return new Iterator<IPAddressSeqRange>() {
			Iterator<? extends IPAddress> prefixBlockIterator = prefixBlockIterator(prefixLength);
			private boolean first = true;

			@Override
			public boolean hasNext() {
				return prefixBlockIterator.hasNext();
			}

		    @Override
			public IPAddressSeqRange next() {
		    	IPAddress next = prefixBlockIterator.next();
		    	if(first) {
		    		first = false;
		    		// next is a prefix block
		    		IPAddress lower = getLower();
		    		if(hasNext()) {
			    		if(!lower.includesZeroHost(prefixLength)) {
			    			return create(lower, next.getUpper());
			    		}
		    		} else {
		    			IPAddress upper = getUpper();
		    			if(!lower.includesZeroHost(prefixLength) || !upper.includesMaxHost(prefixLength)) {
		    				return create(lower, upper);
		    			}
		    		}
		    	} else if(!hasNext()) {
		    		IPAddress upper = getUpper();
		    		if(!upper.includesMaxHost(prefixLength)) {
		    			return create(next.getLower(), upper);
		    		}
		    	}
		    	return next.toSequentialRange();
		    }
		
		    @Override
			public void remove() {
		    	throw new UnsupportedOperationException();
		    }
		};
	}
471105
public int getLength()
	{
		int length = 0;

		Iterator<V> it = this.values().iterator();
		while (it.hasNext())
		{
			length += ((ID3v2Frame) it.next()).getFrameLength();
		}

		return length;
	}
1075612
@Override
	public Iterator<? extends IPAddress> prefixBlockIterator(int prefLength) {
		if(prefLength < 0) {
			throw new PrefixLenException(prefLength);
		}
		IPv6Address lower = getLower();
		IPv6Address upper = getUpper();
		AddressCreator<IPv6Address, ?, ?, IPv6AddressSegment> creator = getAddressCreator();
		return iterator(
				lower,
				upper,
				creator,
				IPv6Address::getSegment,
				(seg, segIndex) -> seg.iterator(),
				(addr1, addr2, index) -> {
					Integer segPrefLength = ParsedAddressGrouping.getPrefixedSegmentPrefixLength(IPv6Address.BITS_PER_SEGMENT, prefLength, index);
					if(segPrefLength == null) {
						return addr1.getSegment(index).getSegmentValue() == addr2.getSegment(index).getSegmentValue();
					}
					int shift = IPv6Address.BITS_PER_SEGMENT - segPrefLength;
					return addr1.getSegment(index).getSegmentValue() >>> shift == addr2.getSegment(index).getSegmentValue() >>> shift;
				},
				getNetworkSegmentIndex(prefLength, IPv6Address.BYTES_PER_SEGMENT, IPv6Address.BITS_PER_SEGMENT),
				getHostSegmentIndex(prefLength, IPv6Address.BYTES_PER_SEGMENT, IPv6Address.BITS_PER_SEGMENT),
				(seg, index) -> {
					Integer segPrefLength = ParsedAddressGrouping.getPrefixedSegmentPrefixLength(IPv6Address.BITS_PER_SEGMENT, prefLength, index);
					if(segPrefLength == null) {
						return seg.iterator();
					}
					return seg.prefixBlockIterator(segPrefLength);
				});
	}
1173054
public int getLength() {
        int length = 12;

        if (mCodeBuffer != null) {
            length += mCodeBuffer.getByteCodes().length;
            ExceptionHandler[] handlers = mCodeBuffer.getExceptionHandlers();
            if (handlers != null) {
                length += 8 * handlers.length;
            }
        }
        
        int size = mAttributes.size();
        for (int i=0; i<size; i++) {
            length += mAttributes.get(i).getLength();
            length += 6; // attributes have an intial 6 byte length
        }
        
        return length;
    }
307533
@Pure
	public double getLength() {
		double length  = 0;
		for (final RoadPath p : this.paths) {
			length += p.getLength();
		}
		return length;
	}
101291
public double getLength() {
		double length = 0;
		if (!isEmpty()) {
			length = exteriorRing.getLength();
			if (interiorRings != null) {
				for (LinearRing interiorRing : interiorRings) {
					length += interiorRing.getLength();
				}
			}
		}
		return length;
	}
697865
public long getLength()
  {
    StreamSource indirectSource = _indirectSource;
    
    if (indirectSource != null) {
      return indirectSource.getLength();
    }
    
    TempOutputStream out = _out;
    
    if (out != null) {
      return out.getLength();
    }
    else {
      return -1;
    }
  }