Package java.util

Examples of java.util.TreeSet.last()


        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

    assertTrue(
        "Answered incorrect first element--did not use custom comparator ",
        myTreeSet.first().equals(new Integer(2)));
    assertTrue(
        "Answered incorrect last element--did not use custom comparator ",
        myTreeSet.last().equals(new Integer(1)));
  }

  /**
   * @tests java.util.TreeSet#TreeSet(java.util.SortedSet)
   */
 
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

       
        //
        // create a binary tree of numbers, pick the last one (= largest)
        //
        TreeSet sortedNumbers = new TreeSet(getFileNumbersByEPR().values());
        Integer largest = (Integer)sortedNumbers.last();
        return largest.intValue() + 1;
    }
   
    /**
     *
 
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

    public void testForLostKeys()
    {
        generateKeys();
        TreeSet set = new TreeSet((List) generatedKeys.clone());
        if (set.isEmpty()) fail("No generated keys found");
        int result = ((Integer) set.last()).intValue() - ((Integer) set.first()).intValue() + 1;
        assertEquals("Sequence manager lost sequence numbers, this could be a failure or could be" +
                " the volitional behaviour of the sequence manager" +
                " - retry test case, check test case, check sequence manager implementation.", keyCount, result);
    }
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.