xvii my implementations are meant to provide concrete illustrations of data structure principlesas an aid to the textual exposition code examples should not be read or used in isolation from the associated text because the bulk of each example' documentation is contained in the textnot the code the code complements the textnot the other way around they are not meant to be series of commercialquality class implementations if you are looking for complete implementation of standard data structure for use in your own codeyou would do well to do an internet search for instancethe code examples provide less parameter checking than is sound programming practicesince including such checking would obscure rather than illuminate the text some parameter checking and testing for other constraints ( whether value is being removed from an empty containeris included in the form of calls to methods in class assert these methods are modeled after the standard library function assert method assert notfalse takes boolean expression if this expression evaluates to falsethen message is printed and the program terminates immediately method assert notnull takes reference to class objectand terminates the program if the value of the reference is null (to be precisethese functions throw an illegalargumentexceptionwhich typically results in terminating the program unless the programmer takes action to handle the exception terminating program when function receives bad parameter is generally considered undesirable in real programsbut is quite adequate for understanding how data structure is meant to operate in real programming applicationsjava' exception handling features should be used to deal with input data errors howeverassertions provide simpler mechanism for indicating required conditions in way that is both adequate for clarifying how data structure is meant to operateand is easily modified into true exception handling make distinction in the text between "java implementationsand "pseudocode code labeled as java implementation has actually been compiled and tested on one or more java compilers pseudocode examples often conform closely to java syntaxbut typically contain one or more lines of higher-level description pseudocode is used where perceived greater pedagogical advantage to simplerbut less precisedescription exercises and projectsproper implementation and analysis of data structures cannot be learned simply by reading book you must practice by implementing real programsconstantly comparing different techniques to see what really works best in given situation