Package nl.tudelft.simulation.examples.dsol.terminal

# Class IntResource.RequestComparator

java.lang.Object
nl.tudelft.simulation.examples.dsol.terminal.IntResource.RequestComparator

All Implemented Interfaces:
  `Comparator<IntResource.Request<A,​R,​T>>`

Enclosing class:
  IntResource<A extends Comparable<A> & Serializable,​R extends Number & Comparable<R>,​T extends SimTime<A,​R,​T>>

    protected class IntResource.RequestComparator
    extends Object
    implements Comparator<IntResource.Request<A,​R,​T>>

the RequestComparator. This comparator first checks on priority, then on ID.

## Constructor Summary

Constructors
Modifier | Constructor | Description
--- | --- | ---
`protected` | `RequestComparator()` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`int` | `compare​(IntResource.Request<A,​R,​T> arg0, IntResource.Request<A,​R,​T> arg1)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Comparator

`equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

## Constructor Details

### RequestComparator

protected RequestComparator()

## Method Details

### compare

public final int compare​(IntResource.Request<A,​R,​T> arg0, IntResource.Request<A,​R,​T> arg1)

Specified by:
  `compare` in interface `Comparator<IntResource.Request<A extends Comparable<A> & Serializable,​R extends Number & Comparable<R>,​T extends SimTime<A,​R,​T>>>`