public interface

Weighted

com.atlassian.bitbucket.util.Weighted
Known Indirect Subclasses

Class Overview

An interface for objects that have a weight associated with them used for sorting. Lower weights are first (on the top), heavier weights come last (on the bottom).

Summary

Fields
public static final Comparator<Weighted> COMPARABLE Note that this comparator only considers weight.
Public Methods
int getWeight()

Fields

public static final Comparator<Weighted> COMPARABLE

Note that this comparator only considers weight. If you use this in a SortedSet implementation, you will lose elements with the same weight because it reports they are equal. This is intended for use with Collections.sort()

Public Methods

public int getWeight ()

Returns
  • the weight of this item (lower weight first, higher weight lower)