Package java.util

Examples of java.util.SortedSet.last()


  
   
//--------------------------------------------------------------------           
    protected Long getNextAsLong() {
        SortedSet set = (SortedSet) makeFullSet();
        int nextValue = ((Integer)set.last()).intValue() + 1;
        return new Long(nextValue);
    }
   
    protected Integer getNextAsInt() {
        SortedSet set = (SortedSet) makeFullSet();
View Full Code Here


        return new Long(nextValue);
    }
   
    protected Integer getNextAsInt() {
        SortedSet set = (SortedSet) makeFullSet();
        int nextValue = ((Integer)set.last()).intValue() + 1;
        return new Integer(nextValue);
    }
          
    public void testIllegalAdd() {
        Set set = makeFullSet();
View Full Code Here

        Set set = get(destination);
        if (set == null || set.isEmpty()) {
            return null;
        }
        SortedSet sortedSet = new TreeSet(set);
        return sortedSet.last();
    }

    /**
     * Returns the root node for the given destination type
     */
 
View Full Code Here

        Set set = get(destination);
        if (set == null || set.isEmpty()) {
            return null;
        }
        SortedSet sortedSet = new TreeSet(set);
        return sortedSet.last();
    }

    /**
     * Returns the root node for the given destination type
     */
 
View Full Code Here

            }

            if (list.isEmpty()) {
                return null;
            }
            return (Artifact) list.last();
        }

        // more than one version of the artifact was loaded...

        // if one of parents already loaded the artifact, use that version
View Full Code Here

            }

            if (list.isEmpty()) {
                return null;
            }
            return (Artifact) list.last();
        }

        // more than one version of the artifact was loaded...

        // if one of parents already loaded the artifact, use that version
View Full Code Here

                            RecordLocation pendingMark = (RecordLocation)pendingMarks.first();
                            m = unusedMarks.headSet(pendingMark);
                        }
                        // Is there anything to do ?
                        if (!m.isEmpty()) {
                            RecordLocation last = (RecordLocation)m.last();
                            RecordLocation n = journal.getNextRecordLocation((RecordLocation)m.last());
                            if (n == null) {
                                n = last;
                            }
                            if (logger.isDebugEnabled()) {
View Full Code Here

                            m = unusedMarks.headSet(pendingMark);
                        }
                        // Is there anything to do ?
                        if (!m.isEmpty()) {
                            RecordLocation last = (RecordLocation)m.last();
                            RecordLocation n = journal.getNextRecordLocation((RecordLocation)m.last());
                            if (n == null) {
                                n = last;
                            }
                            if (logger.isDebugEnabled()) {
                                logger.debug("Marking to " + n + " / "
View Full Code Here

        if (artifact != null) {
            return artifact;
        }

        // it wasn't declared by the parent so just use the highest verstion already loaded
        return (Artifact) existingArtifacts.last();
    }

    private Artifact searchParents(Collection<Configuration> parentConfigurations, Artifact working) {
        for (Configuration configuration : parentConfigurations) {
View Full Code Here

        Set set = get(destination);
        if (set == null || set.isEmpty()) {
            return null;
        }
        SortedSet sortedSet = new TreeSet(set);
        return sortedSet.last();
    }

    /**
     * Returns the root node for the given destination type
     */
 
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.