Produces a normalized string to represent the segment.
If the segment CIDR prefix length covers the range, then it is assumed to be a CIDR, and the string has only the lower value of the CIDR range.
Otherwise, the explicit range will be printed.
@return
489586
protected String getString() {
		String result = cachedWildcardString;
		if(result == null) {
			synchronized(this) {
				result = cachedWildcardString;
				if(result == null) {
					if(!isMultiple()) {
						result = getDefaultLowerString();
					} else if(!isFullRange() || (result = getDefaultSegmentWildcardString()) == null) {
						result = getDefaultRangeString();
					}
					cachedWildcardString = result;
				}
			}
		}
		return result;
	}
801448
String
rrToString() {
	StringBuffer sb = new StringBuffer();
	sb.append(prefixBits);
	if (suffix != null) {
		sb.append(" ");
		sb.append(suffix.getHostAddress());
	}
	if (prefix != null) {
		sb.append(" ");
		sb.append(prefix);
	}
	return sb.toString();
}
661585
public BinaryString toUpperCase() {
		if (javaObject != null) {
			return toUpperCaseSlow();
		}
		if (sizeInBytes == 0) {
			return EMPTY_UTF8;
		}
		int size = segments[0].size();
		SegmentAndOffset segmentAndOffset = startSegmentAndOffset(size);
		byte[] bytes = new byte[sizeInBytes];
		bytes[0] = (byte) Character.toTitleCase(segmentAndOffset.value());
		for (int i = 0; i < sizeInBytes; i++) {
			byte b = segmentAndOffset.value();
			if (numBytesForFirstByte(b) != 1) {
				// fallback
				return toUpperCaseSlow();
			}
			int upper = Character.toUpperCase((int) b);
			if (upper > 127) {
				// fallback
				return toUpperCaseSlow();
			}
			bytes[i] = (byte) upper;
			segmentAndOffset.nextByte(size);
		}
		return fromBytes(bytes);
	}
1301165
@Override
	public String toNormalizedWildcardString() {
		String result;
		if(hasNoStringCache() || (result = stringCache.normalizedWildcardString) == null) {
			if(hasZone()) {
				stringCache.normalizedWildcardString = result = toNormalizedString(IPv6StringCache.wildcardNormalizedParams);
			} else {
				result = getSection().toNormalizedWildcardString();//the cache is shared so no need to update it here
			}
		}
		return result;
	}
475053
public String formatted()
    {
        String callerID = ""; //$NON-NLS-1$
        if (this.name != null)
        {
            callerID += this.name;
        }
        if (this.number != null)
        {
            if (callerID.length() > 1)
            {
                callerID += " "; //$NON-NLS-1$
            }
            callerID += "<" + this.number + ">"; //$NON-NLS-1$ //$NON-NLS-2$
        }
        return callerID;
    }
176532
public String getString() 
    {       // Usually overidden
        int maxLength = this.getMaxLength();
        String string = (String)this.getData();
        if (string == null)
            return Constants.BLANK;
        if (string.length() > maxLength)
            string = string.substring(0, maxLength);
        return string;
    }
868538
public String getString()
    {
        String string = super.getString();
        int iIndent = (int)m_convIndent.getValue();
        string = gstrSpaces.substring(0, iIndent * m_iIndentAmount) + string;
        return string;
    }
1104988
public static String normalize(String s) {
    StringBuilder b = new StringBuilder();
    for (int i = 0; i < s.length(); i++)
      b.append(normalize(s.charAt(i)));
    return (b.toString());
  }
185377
public String contentsAsString()
    {
        if (mResultString == null) {
            // Has array been requested? Can make a shortcut, if so:
            if (mResultArray != null) {
                mResultString = new String(mResultArray);
            } else {
                // Do we use shared array?
                if (mInputStart >= 0) {
                    if (mInputLen < 1) {
                        return (mResultString = "");
                    }
                    mResultString = new String(mInputBuffer, mInputStart, mInputLen);
                } else { // nope... need to copy
                    // But first, let's see if we have just one buffer
                    int segLen = mSegmentSize;
                    int currLen = mCurrentSize;
                    
                    if (segLen == 0) { // yup
                        mResultString = (currLen == 0) ? "" : new String(mCurrentSegment, 0, currLen);
                    } else { // no, need to combine
                        StringBuilder sb = new StringBuilder(segLen + currLen);
                        // First stored segments
                        if (mSegments != null) {
                            for (int i = 0, len = mSegments.size(); i < len; ++i) {
                                char[] curr = mSegments.get(i);
                                sb.append(curr, 0, curr.length);
                            }
                        }
                        // And finally, current segment:
                        sb.append(mCurrentSegment, 0, mCurrentSize);
                        mResultString = sb.toString();
                    }
                }
            }
        }
        return mResultString;
    }
736918
public Vector normalize() {
        double length = length();

        x /= length;
        y /= length;
        z /= length;

        return this;
    }
1285140
public int getLength() {
    // Alias, number of patterns
    int length = 4 + 4;

    if (this.identifierPatterns != null) {
      for (String identifier : this.identifierPatterns) {
        try {
          length += (4 + identifier.getBytes("UTF-16BE").length);
        } catch (UnsupportedEncodingException e) {
          log.error("Unable to encode to UTF-16BE.");
        }
      }
    }
    return length;
  }
1091683
public String getString() {
		final int len = getVInt();
		final byte[] utf = new byte[len];
		System.arraycopy(buf, bufPosition, utf, 0, utf.length);
		bufPosition += utf.length;
		return new String(utf, 0, len, charsetUTF8);
	}
550258
public String toUuidString() {
    		String[] items = new String[] {contentAsHex(0, 4), contentAsHex(4, 6),
                              contentAsHex(6, 8), contentAsHex(8, 10),
                              contentAsHex(10, 16)};
            String result = StringUtils.join(items, "-");
            return result.toLowerCase();
    }
569239
public int getMessageLength() {
		// Message type
		int messageLength = 1;

		// Number of aliases
		messageLength += 4;

		if (this.aliases != null) {
			for (OriginAlias alias : this.aliases) {
				// Alias number, name length
				messageLength += 8;
				try {
					messageLength += alias.origin.getBytes("UTF-16BE").length;
				} catch (UnsupportedEncodingException e) {
					log.error("Unable to encode strings into UTF-16.");
					e.printStackTrace();
				}
			}
		}

		return messageLength;
	}
902174
public static Range<IPv6> cidrRange(String cidr) {
        try {
            MoreInetAddresses.CidrInfo cidrInfo = parseCIDR(cidr);
            if (cidrInfo.getNetwork() instanceof Inet6Address &&
                    cidrInfo.getBroadcast() instanceof Inet6Address) {

                return closed(new IPv6((Inet6Address) cidrInfo.getNetwork()),
                        new IPv6((Inet6Address) cidrInfo.getBroadcast()));
            }

        } catch (Exception ignored) {}

        throw new IllegalArgumentException(format("Invalid IPv6 cidr representation %s", cidr));
    }
483513
public String toStringByValue() {
	IntArrayList theKeys = new IntArrayList();
	keysSortedByValue(theKeys);

	StringBuffer buf = new StringBuffer();
	buf.append("[");
	int maxIndex = theKeys.size() - 1;
	for (int i = 0; i <= maxIndex; i++) {
		int key = theKeys.get(i);
	    buf.append(String.valueOf(key));
		buf.append("->");
	    buf.append(String.valueOf(get(key)));
		if (i < maxIndex) buf.append(", ");
	}
	buf.append("]");
	return buf.toString();
}
1041827
public String randomLowerMaxLength(int minLength, int maxLength) {
        int range = maxLength - minLength;
        int randomLength = 0;
        if (range > 0) {
            randomLength = random(range);
        }
        return randomLower(minLength + randomLength);
    }