/** * @param v1 The first typed dimension value. * @param v2 The second typed dimension value. * @return a negative integer, zero, or a positive integer as the first argument is less than, * equal to, or greater than the second. * @throws XBRLException */ protected int compareTypedDimensionValues(DimensionValue v1, DimensionValue v2) throws XBRLException { Store store = v1.getItem().getStore(); String v1s = store.serializeToString((Element) v1.getValue()); String v2s = store.serializeToString((Element) v2.getValue()); return v1s.compareTo(v2s); }
/** * Do a comparison of the items that the dimension values are for, ranking them based on the * string comparison of their index values. * * @param v1 The first typed dimension value. * @param v2 The second typed dimension value. * @return a negative integer, zero, or a positive integer as the first argument is less than, * equal to, or greater than the second. * @throws XBRLException */ protected int compareItems(DimensionValue v1, DimensionValue v2) throws XBRLException { return v1.getItem().compareTo(v2.getItem()); }