All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.neogroup.warp.controllers.routing.RouteIndex Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version

package org.neogroup.warp.controllers.routing;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class RouteIndex {

    private List routes;
    private List genericRoutes;
    private Map routeIndexes;

    public RouteIndex() {
        routes = new ArrayList<>();
        genericRoutes = new ArrayList<>();
        routeIndexes = new HashMap<>();
    }

    public void clear () {
        routes.clear();
        genericRoutes.clear();
        routeIndexes.clear();
    }

    public List getRoutes() {
        return routes;
    }

    public List getGenericRoutes() {
        return genericRoutes;
    }

    public void addRoute(RouteEntry route) {
        routes.add(route);
    }

    public void addGenericRoute(RouteEntry route) {
        genericRoutes.add(route);
    }

    public void addRouteIndex (String context, RouteIndex index) {
        routeIndexes.put(context, index);
    }

    public RouteIndex getRouteIndex (String context) {
        return routeIndexes.get(context);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy