public class NetexVersionHelper extends Object
This class implements Norwegian profile specific rules.
| Modifier and Type | Method and Description |
|---|---|
static <T extends org.rutebanken.netex.model.EntityInVersionStructure> |
comparingVersion()
Return a comparator to compare
EntityInVersionStructure elements by version. |
static <T extends org.rutebanken.netex.model.EntityInVersionStructure> |
latestVersionedElementIn(Collection<T> list)
Return the element with the latest (maximum) version for a given
list of elements. |
static int |
latestVersionIn(Collection<? extends org.rutebanken.netex.model.EntityInVersionStructure> list)
Return the latest (maximum) version number for the given
list of elements. |
static int |
versionOf(org.rutebanken.netex.model.EntityInVersionStructure e)
According to the Norwegian Netex profile the version number must be a
positive increasing integer.
|
public static int versionOf(org.rutebanken.netex.model.EntityInVersionStructure e)
public static int latestVersionIn(Collection<? extends org.rutebanken.netex.model.EntityInVersionStructure> list)
list of elements.
If no elements exist in the collection -1 is returned.public static <T extends org.rutebanken.netex.model.EntityInVersionStructure> T latestVersionedElementIn(Collection<T> list)
list of elements.
If no elements exist in the collection null is returned.public static <T extends org.rutebanken.netex.model.EntityInVersionStructure> Comparator<T> comparingVersion()
EntityInVersionStructure elements by version.Copyright © 2021 Entur AS. All rights reserved.