List of usage examples for com.google.common.collect ImmutableSortedMap of
public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3)
From source file:com.noodlewiz.xjavab.core.ValueParam.java
/** * Returns a ValueParam containing the given entries, in order. *//*from w ww . ja v a 2s . c om*/ public ValueParam(final long k1, final long v1, final long k2, final long v2, final long k3, final long v3) { mMap = ImmutableSortedMap.of(k1, v1, k2, v2, k3, v3); }
From source file:org.sonar.batch.rule.QProfileEventsDecorator.java
private void markAsChanged(DecoratorContext context, QProfile previousProfile, QProfile profile) { // DecoratorContext does not allow to set event data, so SonarIndex must be used Event event = new Event(); event.setName(String.format("Changes in %s", profileLabel(profile))); event.setCategory(Event.CATEGORY_PROFILE); Date from = previousProfile.getRulesUpdatedAt(); String data = KeyValueFormat.format( ImmutableSortedMap.of("key", profile.getKey(), "from", UtcDateUtils.formatDateTime(fixDate(from)), "to", UtcDateUtils.formatDateTime(fixDate(profile.getRulesUpdatedAt())))); event.setData(data);//from w w w. j a v a 2 s . c o m persistenceManager.saveEvent(context.getResource(), event); }
From source file:org.sonar.server.computation.task.projectanalysis.step.QualityProfileEventsStep.java
private void markAsChanged(Component component, QualityProfile baseProfile, QualityProfile profile) { Date from = baseProfile.getRulesUpdatedAt(); String data = KeyValueFormat.format( ImmutableSortedMap.of("key", profile.getQpKey(), "from", UtcDateUtils.formatDateTime(fixDate(from)), "to", UtcDateUtils.formatDateTime(fixDate(profile.getRulesUpdatedAt())))); eventRepository.add(component, createQProfileEvent(profile, "Changes in %s", data)); }