Returns a sorted map with annotations to be sent with each message.
Default behavior is to include the current correlation id (if it is set).
424804
public SortedMap<String, byte[]> annotations()
	{
		SortedMap<String,byte[]> ann = new TreeMap<String, byte[]>();
		if(correlation_id!=null) {
			long hi = correlation_id.getMostSignificantBits();
			long lo = correlation_id.getLeastSignificantBits();
			ann.put("CORR", ByteBuffer.allocate(16).putLong(hi).putLong(lo).array());
		}
		return ann;
	}
360441
public Map<String, String> getSortedMap()
    {
        ImmutableSortedMap.Builder<String, String> builder = ImmutableSortedMap.naturalOrder();
        for ( FieldValue fv : fieldValues )
        {
            builder.put(fv.getField(), fv.getValue());
        }

        return builder.build();
    }
582771
private Map<Integer, List<Annotation>> splitListAnnotations()
  {
    List<Annotation> metadata = Helper.getMetaData(toplevelCorpusName,
      documentName);

    Map<Integer, List<Annotation>> hashMetaData = new HashMap<>();


    if (metadata != null && !metadata.isEmpty())
    {
      // if called from corpus browser sort the other way around.
      if (documentName != null)
      {
        hashMetaData =
          new TreeMap<>(Collections.reverseOrder());
      }
      else
      {
        hashMetaData = new TreeMap<>();
      }

      for (Annotation metaDatum : metadata)
      {
        int pre = metaDatum.getPre();
        if (!hashMetaData.containsKey(pre))
        {
          hashMetaData.put(pre, new ArrayList<Annotation>());
          hashMetaData.get(pre).add(metaDatum);
        }
        else
        {
          hashMetaData.get(pre).add(metaDatum);
        }
      }
    }

    return hashMetaData;
  }
923430
public Map<String, Collection<Message>> getGrouped() {
		if (grouped == null) {
			grouped = FluentIterable.from(delegate).index(byCategoryMapping()).asMap();
		}
		return grouped;
	}
631833
public static Map<String,String> order(Map<String, String> map){
		HashMap<String, String> tempMap = new LinkedHashMap<String, String>();
		List<Map.Entry<String, String>> infoIds = new ArrayList<Map.Entry<String, String>>(	map.entrySet());

		Collections.sort(infoIds, new Comparator<Map.Entry<String, String>>() {
			public int compare(Map.Entry<String, String> o1,Map.Entry<String, String> o2) {
				return (o1.getKey()).toString().compareTo(o2.getKey());
			}
		});

		for (int i = 0; i < infoIds.size(); i++) {
			Map.Entry<String, String> item = infoIds.get(i);
			tempMap.put(item.getKey(), item.getValue());
		}
		return tempMap;
	}
847399
public String list(List<String> messages) {
		List<String> sortedComponents = new ArrayList<String>(messages);
		Collections.sort(sortedComponents);
		String output = "";
		for (String component : sortedComponents) {
			output += "\n" + component;
		}
		return output;
	}
1088114
public List<String> getAnnotations() {
        AnnotationBuilder result = new AnnotationBuilder();
        result.add( //
                getFixedLengthAnnotation(), //
                getLengthAnnotation(), //
                getNotNullAnnotation(), //
                getNotEmptyAnnotation(), //
                getCharPaddingAnnotation(), //
                getEmailAnnotation(), //
                getDigitsAnnotation(), //
                getSafeHtmlAnnotation(), //
                getUrlAnnotation());
        return result.getAnnotations();
    }
347636
private Map<String, Message> getMessages(Query qry, Folder folder, String[] uids, String[] messageNumbers, int startRow, int maxRow, boolean all) throws MessagingException {

	Message[] messages = folder.getMessages();
	Map<String, Message> map = qry == null ? new HashMap<String, Message>() : null;
	int k = 0;
	if (uids != null || messageNumbers != null) {
	    startRow = 0;
	    maxRow = -1;
	}
	Message message;
	for (int l = startRow; l < messages.length; l++) {
	    if (maxRow != -1 && k == maxRow) {
		break;
	    }
	    message = messages[l];
	    int messageNumber = message.getMessageNumber();
	    String id = getId(folder, message);

	    if (uids == null ? messageNumbers == null || contains(messageNumbers, messageNumber) : contains(uids, id)) {
		k++;
		if (qry != null) {
		    toQuery(qry, message, id, all);
		}
		else map.put(id, message);
	    }
	}
	return map;
    }
940736
public static synchronized Map<String, List<QuickFixContribution>> getContributedQuickFixes() {
        if (contributedQuickFixes != null) {
            return contributedQuickFixes;
        }
        HashMap<String, List<QuickFixContribution>> set = new HashMap<>();

        IExtensionRegistry registry = Platform.getExtensionRegistry();
        for (IConfigurationElement configElt : registry.getConfigurationElementsFor(EXTENSION_POINT_ID)) {
            addContribution(set, configElt);
        }
        Set<Entry<String, List<QuickFixContribution>>> entrySet = set.entrySet();
        for (Entry<String, List<QuickFixContribution>> entry : entrySet) {
            entry.setValue(Collections.unmodifiableList(entry.getValue()));
        }
        contributedQuickFixes = Collections.unmodifiableMap(set);
        return contributedQuickFixes;
    }
734939
public static <K, V> Map<K, V> toSorted(SortedMap<K, V> self) {
        return new LinkedHashMap<K, V>(self);
    }
968389
protected LinkedHashMap<String, String> getSortList() {

        LinkedHashMap<String, String> list = new LinkedHashMap<String, String>();
        list.put(SortParams.tree.name(), Messages.get().key(Messages.GUI_SORT_LABEL_HIERARCHIC_0));
        list.put(SortParams.title_asc.name(), Messages.get().key(Messages.GUI_SORT_LABEL_TITLE_ASC_0));
        list.put(SortParams.title_desc.name(), Messages.get().key(Messages.GUI_SORT_LABEL_TITLE_DECS_0));
        list.put(SortParams.path_asc.name(), Messages.get().key(Messages.GUI_SORT_LABEL_PATH_ASC_0));
        list.put(SortParams.path_desc.name(), Messages.get().key(Messages.GUI_SORT_LABEL_PATH_DESC_0));

        return list;
    }
633248
public List getSortedEntries() {

        Map grouped = new HashMap();

        for (int i = 0; i < indexentry.size(); i++) {
            Entry e = (Entry) indexentry.get(i);
            String key = e.getKey();

            Entry master = (Entry) grouped.get(key);
            if (master != null) {
                master.addPageNumberAndTag(e.getPageNumber(), e.getTag());
            } else {
                e.addPageNumberAndTag(e.getPageNumber(), e.getTag());
                grouped.put(key, e);
            }
        }

        // copy to a list and sort it
        List sorted = new ArrayList(grouped.values());
        Collections.sort(sorted, comparator);
        return sorted;
    }
1182579
public Map<String, Long> getMessageCounts(){
        Map<String, Long> counts = new HashMap<>();
        for (QueueConfig queueConfig : queueConfigsList) {
            counts.put(queueConfig.getName(), getMessageCount(queueConfig.getName()));
        }
        return counts;
    }
192603
public Map<String, String> getSortParameter() {

        return new HashMap<String, String>() {{
            put(sortUrlParameterName, getFields());
        }};
    }
1001164
public Set<Node> getCorrelatedNodes(CorrelationIdentifier cid) {
        Set<Node> ret = new HashSet<Node>();

        for (Node n : getNodes()) {
            n.findCorrelatedNodes(cid, ret);
        }

        return ret;
    }
1076585
private Map<String, SortedSet<Partition>> getZKTopicPartitionInfo(Map<Integer, Broker> allBrokers) {
        final Map<String, SortedSet<Partition>> brokerPartitionsPerTopic = new HashMap<String, SortedSet<Partition>>();
        ZkUtils.makeSurePersistentPathExists(zkClient, ZkUtils.BrokerTopicsPath);
        List<String> topics = ZkUtils.getChildrenParentMayNotExist(zkClient, ZkUtils.BrokerTopicsPath);
        for (String topic : topics) {
            // find the number of broker partitions registered for this topic
            String brokerTopicPath = ZkUtils.BrokerTopicsPath + "/" + topic;
            List<String> brokerList = ZkUtils.getChildrenParentMayNotExist(zkClient, brokerTopicPath);
            //
            final SortedSet<Partition> sortedBrokerPartitions = new TreeSet<Partition>();
            final Set<Integer> existBids = new HashSet<Integer>();
            for (String bid : brokerList) {
                final int ibid = Integer.parseInt(bid);
                final String numPath = brokerTopicPath + "/" + bid;
                final Integer numPartition = Integer.valueOf(ZkUtils.readData(zkClient, numPath));
                for (int i = 0; i < numPartition.intValue(); i++) {
                    sortedBrokerPartitions.add(new Partition(ibid, i));
                }
                existBids.add(ibid);
            }
            // add all brokers after topic created
            for(Integer bid:allBrokers.keySet()){
                if(!existBids.contains(bid)){
                    sortedBrokerPartitions.add(new Partition(bid,0));// this broker run after topic created
                }
            }
            logger.debug("Broker ids and # of partitions on each for topic: " + topic + " = " + sortedBrokerPartitions);
            brokerPartitionsPerTopic.put(topic, sortedBrokerPartitions);
        }
        return brokerPartitionsPerTopic;
    }
1251421
public Map<String, Object> getNamedBindings() {
    ImmutableMap.Builder<String, Object> builder = ImmutableSortedMap.naturalOrder();
    for (Map.Entry<String, Binding> binding : namedBindings.entrySet()) {
      builder.put(binding.getKey(), binding.getValue().getCursorOrValue());
    }
    return builder.build();
  }