org.webpieces.httpparser.api.subparsers.HeaderItem Maven / Gradle / Ivy
package org.webpieces.httpparser.api.subparsers;
public class HeaderItem implements Comparable> {
private double priority;
private T item;
public HeaderItem(double priority, T item) {
this.priority = priority;
this.item = item;
}
public double getPriority() {
return priority;
}
public T getItem() {
return item;
}
@Override
public int compareTo(HeaderItem o) {
Double left = new Double(this.priority);
Double right = new Double(o.priority);
return right.compareTo(left);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy