Appends a human-formatted representation of the time delta to the given {@link Appendable} object.

@param <T> the return type
@param a   the Appendable object, may not be <code>null</code>
@return the given Appendable object, never <code>null</code>
178551
public <T extends Appendable> T getExactly(T a) {
        try {
            boolean prependBlank = false;
            long d = delta;
            if (d >= YEAR) {
                a.append(floor(d, YEAR));
                a.append(' ');
                a.append('y');
                prependBlank = true;
            }
            d %= YEAR;
            if (d >= DAY) {
                if (prependBlank) {
                    a.append(' ');
                }
                a.append(floor(d, DAY));
                a.append(' ');
                a.append('d');
                prependBlank = true;
            }
            d %= DAY;
            if (d >= HOUR) {
                if (prependBlank) {
                    a.append(' ');
                }
                a.append(floor(d, HOUR));
                a.append(' ');
                a.append('h');
                prependBlank = true;
            }
            d %= HOUR;
            if (d >= MINUTE) {
                if (prependBlank) {
                    a.append(' ');
                }
                a.append(floor(d, MINUTE));
                a.append(' ');
                a.append('m');
                prependBlank = true;
            }
            d %= MINUTE;
            if (d >= SECOND) {
                if (prependBlank) {
                    a.append(' ');
                }
                a.append(floor(d, SECOND));
                a.append(' ');
                a.append('s');
                prependBlank = true;
            }
            d %= SECOND;
            if (d > 0) {
                if (prependBlank) {
                    a.append(' ');
                }
                a.append(Integer.toString((int) d));
                a.append(' ');
                a.append('m');
                a.append('s');
            }
        } catch (IOException ex) {
            // What were they thinking...
        }
        return a;
    }
1372668
public static void write(Instance instance, Appendable a) {
        try {
            InstanceConverter c = new InstanceConverter();
            c.toJSON(instance).writeJSONString(a);
        } catch (IOException | JSONConverterException e) {
            throw new IllegalArgumentException(e);
        }
    }
1258400
public Signature appendArg(String name, Class<?> type) {
        String[] newArgNames = new String[argNames.length + 1];
        System.arraycopy(argNames, 0, newArgNames, 0, argNames.length);
        newArgNames[argNames.length] = name;
        MethodType newMethodType = methodType.appendParameterTypes(type);
        return new Signature(newMethodType, newArgNames);
    }
642667
public static <T extends Comparable<?>> TimeTemplate<T> timeTemplate(Class<? extends T> cl,
                                                                           String template, Object... args) {
        return timeTemplate(cl, createTemplate(template), ImmutableList.copyOf(args));
    }
61892
public static double[] toDouble(float[] a) {
    double[] d = new double[a.length];
    for (int i = 0; i < a.length; i++) {
      d[i] = a[i];
    }
    return d;
  }
429690
public void append(final byte[] a)
	{
		if(a == null) throw new NullPointerException();
		if(a.length == 0) return;
		
		if(a.length <= 8) {
			write(a, 0, a.length);		
		} else
		if((a.length <= 16) && (pos > 0) && ((buffer.length - pos) > a.length)) {
			write(a, 0, a.length);
		} else {
			flushBuffer();
			arrays.add(a);
			size += a.length;
		}
	}
623275
public DateTimeFormatterBuilder appendShortText(DateTimeFieldType fieldType) {
        if (fieldType == null) {
            throw new IllegalArgumentException("Field type must not be null");
        }
        return append0(new TextField(fieldType, true));
    }
1100225
public static String formatTimeDelta(long time, CharSequence sep) {
    final StringBuilder sb = new StringBuilder();
    final Formatter fmt = new Formatter(sb);

    for(int i = TIME_UNIT_SIZES.length - 1; i >= 0; --i) {
      // We do not include ms if we are in the order of minutes.
      if(i == 0 && sb.length() > 4) {
        continue;
      }
      // Separator
      if(sb.length() > 0) {
        sb.append(sep);
      }
      final long acValue = time / TIME_UNIT_SIZES[i];
      time = time % TIME_UNIT_SIZES[i];
      if(!(acValue == 0 && sb.length() == 0)) {
        fmt.format("%0" + TIME_UNIT_DIGITS[i] + "d%s", Long.valueOf(acValue), TIME_UNIT_NAMES[i]);
      }
    }
    fmt.close();
    return sb.toString();
  }
916631
@SuppressWarnings("unchecked")
    protected <A extends Comparable> TimePath<A> createTime(String property, Class<? super A> type) {
        return add(new TimePath<A>((Class) type, forProperty(property)));
    }
503950
public long getAndAdd(T obj, long delta) {
        long prev, next;
        do {
            prev = get(obj);
            next = prev + delta;
        } while (!compareAndSet(obj, prev, next));
        return prev;
    }
834874
private static <T extends Appendable> T _appendToPat(T buf, String s, boolean escapeUnprintable) {
        int cp;
        for (int i = 0; i < s.length(); i += Character.charCount(cp)) {
            cp = s.codePointAt(i);
            _appendToPat(buf, cp, escapeUnprintable);
        }
        return buf;
    }
213818
@Override
    public void addTimestamp(final U u, final I i, final Long t) {
        Map<I, Set<Long>> userTimestamps = userItemTimestamps.get(u);
        if (userTimestamps == null) {
            userTimestamps = new HashMap<>();
            userItemTimestamps.put(u, userTimestamps);
        }
        Set<Long> timestamps = userTimestamps.get(i);
        if (timestamps == null) {
            timestamps = new HashSet<>();
            userTimestamps.put(i, timestamps);
        }
        timestamps.add(t);
    }
520759
@Override public Long append(final String key, final String value) throws WrongTypeException {
        return redisMock.append(key, value);
    }
606353
public static <T extends Comparable<?>> TimeTemplate<T> timeTemplate(Class<? extends T> cl,
                                                                         Template template, Object... args) {
        return timeTemplate(cl, template, ImmutableList.copyOf(args));
    }
1023270
public static <T> T appendObject(String json, T t) {
        @SuppressWarnings("unchecked")
        Class<T> clazz = (Class<T>) t.getClass();
        T tNew = toObject(json, clazz);
        BeanCopierUtil.append(tNew, t);
        return tNew;
    }
1190781
@SuppressWarnings("unchecked")
    protected <A extends Comparable> DateTimePath<A> createDateTime(String property, Class<? super A> type) {
        return add(new DateTimePath<A>((Class) type, forProperty(property)));
    }
59873
ChronoFormatter<T> with(
        Map<ChronoElement<?>, Object> outerDefaults,
        AttributeSet outerAttrs
    ) {

        AttributeSet merged = AttributeSet.merge(outerAttrs, this.globalAttributes);

        return new ChronoFormatter<>(
            new ChronoFormatter<>(this, outerDefaults),
            merged,
            merged.get(HistoricAttribute.CALENDAR_HISTORY, null));

    }