Package java.util

Examples of java.util.SortedSet.first()


        for (ListableRepository repo : repos) {
            // if the artifact is not fully resolved then try to resolve it
            if (!artifact.isResolved()) {
                SortedSet results = repo.list(artifact);
                if (!results.isEmpty()) {
                    artifact = (Artifact) results.first();
                } else {
                    continue;
                }
            }
            File url = repo.getLocation(artifact);
View Full Code Here


       
        for (ListableRepository repository : repositories) {
            SortedSet artifactSet = repository.list(artifactQuery);
            // if we have exactly one artifact found
            if (artifactSet.size() == 1) {
                file = repository.getLocation((Artifact) artifactSet.first());
                return file.getAbsoluteFile().toURL();
            } else if (artifactSet.size() > 1) {// if we have more than 1 artifacts found use the latest one.
                file = repository.getLocation((Artifact) artifactSet.last());
                return file.getAbsoluteFile().toURL();
            }
View Full Code Here

            // get second.................................................
            st = seconds.tailSet(Integer.valueOf(sec));
            if (st != null && st.size() != 0)
            {
                sec = ((Integer) st.first()).intValue();
            } else
            {
                sec = ((Integer) seconds.first()).intValue();
                min++;
                cl.set(Calendar.MINUTE, min);
View Full Code Here

            // get minute.................................................
            st = minutes.tailSet(Integer.valueOf(min));
            if (st != null && st.size() != 0)
            {
                t = min;
                min = ((Integer) st.first()).intValue();
            } else
            {
                min = ((Integer) minutes.first()).intValue();
                hr++;
            }
View Full Code Here

            // get hour...................................................
            st = hours.tailSet(Integer.valueOf(hr));
            if (st != null && st.size() != 0)
            {
                t = hr;
                hr = ((Integer) st.first()).intValue();
            } else
            {
                hr = ((Integer) hours.first()).intValue();
                day++;
            }
View Full Code Here

                        mon++;
                    }
                } else if (st != null && st.size() != 0)
                {
                    t = day;
                    day = ((Integer) st.first()).intValue();
                    // make sure we don't over-run a short month, such as february
                    int lastDay = getLastDayOfMonth(mon, cl.get(Calendar.YEAR));
                    if (day > lastDay)
                    {
                        day = ((Integer) daysOfMonth.first()).intValue();
View Full Code Here

                    int dow = ((Integer) daysOfWeek.first()).intValue(); // desired
                    // d-o-w
                    st = daysOfWeek.tailSet(Integer.valueOf(cDow));
                    if (st != null && st.size() > 0)
                    {
                        dow = ((Integer) st.first()).intValue();
                    }

                    int daysToAdd = 0;
                    if (cDow < dow)
                    {
View Full Code Here

            // get month...................................................
            st = months.tailSet(Integer.valueOf(mon));
            if (st != null && st.size() != 0)
            {
                t = mon;
                mon = ((Integer) st.first()).intValue();
            } else
            {
                mon = ((Integer) months.first()).intValue();
                year++;
            }
View Full Code Here

            // get year...................................................
            st = years.tailSet(Integer.valueOf(year));
            if (st != null && st.size() != 0)
            {
                t = year;
                year = ((Integer) st.first()).intValue();
            } else
            {
                return null; // ran out of years...
            }
View Full Code Here

        for (ListableRepository repo : repos) {
            // if the artifact is not fully resolved then try to resolve it
            if (!artifact.isResolved()) {
                SortedSet results = repo.list(artifact);
                if (!results.isEmpty()) {
                    artifact = (Artifact) results.first();
                } else {
                    continue;
                }
            }
            File url = repo.getLocation(artifact);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.