Java Glossary

Last updated 1998 June 24 Roedy Green ©1996-1998 Canadian Mind Products.

Stuck in a frame? Click here to break out.

L

label
a component used to display decorative text on the screen to label some other component. Layout managers shift labels about just like other components. In contrast text refers to the text inside a component. End users don't typically modify labels. For data entry use textfields or text boxes. See textfield, text box. Note that you must not use repaint after a setText on a label.
Lambda expressions
Church's abstraction of function calls. They are not supported in Java.
language
a way of describing what you want the computer to do and hints how it can do it. Usually it is even more important that fellow humans understand your intent than the computer. The concept of language is being stretched in various new directions. A language is not necessarily a stream of words like English. It could be a flowchart, checkboxes, or some graphical representation that looks like plumbing. Java is just one of many computer languages. Java is being enriched by ideas from people whose background includes the following languages: Abundance, Ada, Algol 68, Alphard, APL, awk, Cecil, C, C++, CLU, COBOL, Delphi/Object Pascal, Dylan, Eiffel, Esperanto, Euler, Forth, FORTRAN 90, some Free compiler, GNUStep, Haskell, Java, Lisp, Logo, ML, Modula, Oberon, NeXT/Objective C, Occam, Perl, PL/I, Prolog, PostScript, Python, RPG, Sail, Sather, Scheme, Simula, Smalltalk, SML, Tcl (tickle), Tom, Visual Basic, or some other language. A great place to get a taste of many different languages is the collection of the source code to print the words to 99 Bottles Of Beer On the Wall.
Language Codes
ISO standard 639.1988 defines two-letter lower case abbreviation codes for each spoken language, e.g. "ar" = Arabic, "en" = English, "eo" = Esperanto. See Country Codes.
LAP-M
Link Access Procedure For Modems is a error-control protocol for modems defined in CCITT spec V.42. This is similar to MNP-4. A V.42 modem, if it cannot connect with V.42 will fall back to MNP-4. Since only the basic level 1 link layer is shared by MNP-4 and LAP-M, this renegotiation can take a fair bit of time.
Last Modified Date
The Java spec says you cannot trust the value of File.getLastModifiedDate to have any particular representation. It turns out it can be trusted after all, though this is still not official. Even on Win95 it returns the number of milliseconds since 1970 Jan 01, 00:00 GMT. See BigDate to see how you might convert these to dates and times.
Latte
Inprise's (Borland's) code name for JBuilder while it was in development. See JBuilder.
Lava
Lava is a set of Java classes for emulating standard C library functions, including printf, text and number formatting classes, data encryption classes, including support for DES (Data Encryption Standard), text stream parsing classes and text console dialog classes.
Layout
a method that fine tunes the sizes and positions of a group of graphical elements from a few rough hints on how you want the layout done. You can roll your own layout manager, or use one of the standard ones. Have a look at Sun's tutorial on layout managers. Beware, Sun's tutorial talks in terms of JDK 1.0.2. Peter Haggar has written a most excellent tutorial. Here is my general understanding of Layouts. Each component has four sizes (height,width). A layout manager basically does a setBounds(x,y,width,height) on each component in a container, which sets the component's actual size and location. The routine that actually assigns co-ordinates and sizes to each component is called: However the container as a whole also needs a getMinimumSize(), getMaximumSize() and getPreferredSize() method too, since it acts a component in an enclosing container. So the layout manager also needs to provide generic routines for computing the desired size of the container by totalling up the sizes of the contained components taking into consideration how they are packed in. These routines are indirectly used used by another higher level layout manager. The routines that compute the sizes of an entire container are called: See CardLayout, FlowLayout, GridBagLayout, PackerLayout.
LDAP
Lightweight Directory Access Protocol. LDAP is a client-server protocol for accessing a directory service. It was initially used as a front-end to X.500, but can also be used with stand-alone and other kinds of directory servers. See the introductory roadmap and the FAQ or RFCs 1777 and 1778.
leap year
The earth takes 365.242190 days to orbit the sun, though this varies from 365.242196 in 1900 to 365.242184 in 2100. For the following calculations of error, we presume 1900 as the standard year. This is not an integral number of days, so we fiddle with the calendar adding leap years to keep the calendar in sync with the sun. There is a great deal of confusion about how you calculate the leap years.

Julius Caesar created the modern calendar in 46 BC. Prior to that it was a mess well beyond your wildest dreams. The Julian calendar is still used by the Russian Orthodox church and by programmers who are ignorant of the official Gregorian calendar. It has leap years every four years without exception. It corrects to 365.25. It gets ahead 1 day every 128 years.

public static final boolean isLeapViaJulian (int yyyy) {
 return yyyy % 4 == 0;
 }

Joseph Justus Scaliger (1540-1609) invented an Astronomical Julian calendar, (named after his father Julius Caesar Scaliger). This Julian calendar uses the offset in days since noon, Jan 1st 4713 BC. In that scheme, 2000 January 1 noon is the start of day number 2,451,545. This calendar follows the original Julian scheme of always adding leap years every four years.

The next major correction was the Gregorian calendar. By 1582, this excess of leap years had built up noticeably. At the suggestion of astronomers Luigi Lilio and Chistopher Clavius, Pope Gregory XIII dropped 10 days from the calendar. Thursday 1582 October 4 Julian was followed immediately by Friday 1582 October 15 Gregorian. He decreed that every 100 years, a leap year should be dropped except that every 400 years the leap year should be restored. Only Italy, Poland, Portugual and Spain went along with the new calendar immediately. One by one other countries adopted it in different years. Britain and its territories (including the USA and Canada) adopted it in 1752. By then, 11 days had to be dropped. 1752 September 2 was followed immediately by 1752 September 14. The Gregorian calendar is the most widely used scheme. This is the scheme endorsed by the US Naval observatory. It corrects the year to 365.2425. It gets ahead 1 day every 3289 years.

public static final boolean isLeapViaPopeGregory (int yyyy) {
 if ( yyyy < 1582 )      return yyyy % 4 == 0;
 if ( yyyy %    4 != 0 ) return false;
 if ( yyyy %  100 != 0 ) return true;
 if ( yyyy %  400 != 0 ) return false;
 return true;
}

Astronomer John Herschel (1792-1871) suggested dropping a leap year every 4000 years. This scheme never received official support. It corrects to 365.24225. It gets ahead 1 day every 18,519 years.

public static final boolean isLeapViaHerschel (int yyyy) {
 if ( yyyy < 1582 )      return yyyy % 4 == 0;
 if ( yyyy %    4 != 0 ) return false;
 if ( yyyy %  100 != 0 ) return true;
 if ( yyyy %  400 != 0 ) return false;
 if ( yyyy % 4000 != 0 ) return true;
 return false;
}

The Greek Orthodox church drops the 400 rule and in its place uses a rule that any year that when divided by 900 gives a remainder of either 200 or 600 is a leap year. This is the official system in Russia. It corrects to 365.24222. It gets ahead 1 day every 41,667 years.

public static final boolean isLeapViaGreek (int yyyy) {
 if ( yyyy < 1582 )      return yyyy % 4 == 0;
 if ( yyyy %    4 != 0 ) return false;
 if ( yyyy %  100 != 0 ) return true;
 int remdr = yyyy % 900;
 return remdr == 200 || remdr == 600;
}

The SPAWAR group in the US Navy propose the following algorithm where a leap year is dropped every 3200 years. This is most accurate of the schemes, and also has the desirable property of undercorrecting, leaving room for leap second correction. It corrects to 365.2421875. It gets behind 1 day every 117,647 years. Leap seconds are added on average every 3 out of 4 years to correct for the ever lengthening day. This means it is best to have a scheme with slightly too few leap days than too many, since the leap seconds can compensate also. Leaps second add up to roughly an extra day every 115,000 years. When you consider the effects of leap seconds, this scheme is bang on, within the limits of the varying length of an astronomical year.

public static final boolean isLeapViaSPAWAR (int yyyy) {
 if ( yyyy < 1582 )      return yyyy % 4 == 0;
 if ( yyyy %    4 != 0 ) return false;
 if ( yyyy %  100 != 0 ) return true;
 if ( yyyy %  400 != 0 ) return false;
 if ( yyyy % 3200 != 0 ) return true;
 return false;
}

I will leave as an exercise for the reader the staircase leap year algorithm that is the most accurate possible. If you get it, I will post it here with an attribution to you. Hints:

Perhaps some future earth citizens will drag the orbit of the earth slightly so no further adjustments will be necessary. More likely, sentient life will convert to a less terracentric calendar, perhaps time quanta since the big bang.

yearJulian
Leap?
Gregorian
Leap?
Herschel
Leap?
Greek
Leap?
SPAWAR
Leap?
1no no no no no
4yes yes yes yes yes
1580yes yes yes yes yes
1582no no no no no
1584yes yes yes yes yes
1600yes yes yes no yes
1700yes no no no no
1800yes no no no no
1900yes no no no no
1996yes yes yes yes yes
1997no no no no no
1999no no no no no
2000yes yes yes yes yes
2100yes no no no no
2200yes no no no no
2300yes no no no no
2400yes yes yes yes yes
2800yes yes yes no yes
2900yes no no yes no
3200yes yes yes no no
3300yes no no yes no
3600yes yes yes no yes
3800yes no no yes no
4000yes yes no no yes
4200yes no no yes no
4400yes yes yes no yes
4700yes no no yes no
4800yes yes yes no yes
5100yes no no yes no
5200yes yes yes no yes
6400yes yes yes no no
6500yes no no yes no
6800yes yes yes no yes
6900yes no no yes no
7200yes yes yes no yes
7400yes no no yes no
7600yes yes yes no yes
7800yes no no yes no

LEDataStream
CMP's little-endian analog to DataInputStream and DataOutputStream that that let you read and write little-ending Intel format binary, least significant byte first. You can download the code and source free. See LEDataInputStream, LEDataOutputStream, LERandomAccessFile, endian, I/O.
LEDataInputStream
CMP's little-endian analog to DataInputStream that lets you read little-ending Intel format binary, least significant byte first. You can download the code and source free. See LEDataOutputStream, LERandomAccessFile, endian, I/O.
LEDataOutputStream
CMP's little-endian analog to DataOutputStream that lets you write little-ending Intel format binary, least significant byte first. You can download the code and source free. See LEDataInputStream, LERandomAccessFile endian, I/O.
leg pulling
A popular Canadian form of humour where you pretend to describe something seriously, and gradually get more ridiculous, seeing how long you can suck people in before they notice. If you are serious about describing a future technology, and you notice your audience is feeling threatened, it is fairly easy to relax them by quickly veering off into an obvious leg pull. This way you can let them get used to new ideas first in the context of humour.
left outer join
See join
LEDataRandomAccessFile
CMP's little-endian analog to RandomAccessile that lets you read/write little-ending Intel format binary, least significant byte first. You can download the code and source free. See LEDataInputStream, LEDataOutputStream, endian, I/O.
lightweights
You can create simple custom components by overriding a few methods of the official ones. These pure Java custom components are referred to as lightweights. They don't have an associated GUI peer object. Since all the code is in Java, these components behave identically on different platforms. In contrast heavyweight components behave according to native GUI rules. Ligtweights do their own drawing, based on something low-level like a canvas or panel. This gives them precise control over how they look and behave. Heavyweights use the native drawing facilities. Lightweights behave the same on all platforms. Heavyweights behave according to the local customs. See Swing, JFC.
Limbo
AT&T/Lucent's new language that competes with Java. It uses digital signatures instead of run-time checking for security. See Inferno, Dis, Plan 9, Styx. See Dis, Inferno, Styx, Plan 9.
Link
In dbAnywhere, a link is an interface to bind GUI objects to the database. A link interface provides methods for the GUI object to report data changes to the database (notifySetData), and for the database to report changes to the GUI object (notifyDataChange). See ListLink, ProjLink, Binder, dbAnywhere.
LinkedList
LinkedList is Canadian Mind Products' replacement for Java Vector class. It is implemented as a classical doubly linked list. It is faster that Vector for insert/delete, but slower for indexed access. The interface is modeled on java.util.Vector, so you can try it both ways and pick which is faster for your needs. Heavily commented Java source is included. Download.
Links To Links
If you can't find it here, try searching these other Java related sites. From there you should be able to find everything on the net related to Java.
Lint
A program that checks source code for possible errors, things that are formally correct, but that look suspicious. There is currently no Lint program for Java. When one is written, let us hope it warns you of the following likely errors:
Linux
Linux is a UNIX-like operating system. Blackdown has ported Java to it. I have written an essay that would be helpful for anyone installing Red Hat Linux for the first time, or who is new to Unix with a Windows 95 background.
list
list of choices from which you can select one. Like a choice displayed already opened up. In dbAnywhere, a List is group of columns in an SQL table. See LinkedList, choice, combo, dbAnywhere.
ListLink
In dbAnywhere, a ListLinklink is an interface to bind GUI objects to a group of columns in the database. A ListLink interface provides methods for the GUI object to report data changes to the database (notifySetData), and for the database to report changes to the GUI object (notifyDataChange). For example, if you had a dbAware Grid object to display multiple columns, it would implement the ListLink interface. There would be a ListBinder object to glue it to the RelationView object. See LinkedList, ProjLink, Link, Binder, dbAnywhere.
Listener
If an object is interested in hearing about events generated in some component, it may register itself as a Listener for that type of event. If your component uses an anonymous inner class that extends one of the eventListenerAdapter classes, it can register itself as a listener for any class of event. This won't interfere with subclasses doing the same thing. Everybody gets notified. event.consume() is the way a subclass can suppress a superclass seeing the event too.
literal
A literal is an explicit number or string constant used in Java programs. Here is a list of all the variant forms I have found Java to support:
ints 1 -1, hex ints 0x0f28, unicode hex '\u003f', octal 027
longs 3L, -99l, 0xf011223344L (Beware! some compilers will just chop the high bits from literals without the trailing L even when assigning to a long.)
floats 1.0345F, 1.04E-12f, .0345f, 1.04e-13f, Float.NaN
doubles 5.6E-120D, 123.4d, 0.1, Double.NaN, Math.PI
Note floating point literals without the explicit trailing f, F, d or D are considered double. In theory you don't need a lead 0, e.g. 0.1d may be written .1d, though the Solaris compiler seems to require it.
Beware! A lead 0 on an integer implies OCTAL. That was a major design blunder inherited from C, guaranteed to introduce puzzling bugs.
boolean true and false,
strings "ABC", enclosed in double quotes,
chars 'A', enclosed in single quotes,
or integer forms e.g. 45, 0x45, '\u003f'
Escape sequences inside char and string literals include:
'\u003f' unicode hex, (must be exactly 4 digits)
'\n' newline,
'\b' backspace,
'\f' formfeed,
'\r' carriage return,
'\t' tab,
'\\' backslash,
'\'' single quote,
'\"' double quote,
'\377' octal (must be exactly 3 digits)
There is no '\' style way of specifying constants in decimal. Just use char c = 123;
The following C forms are not supported:
'\a' alert,
'\v' vertical tab,
'\?' question mark.
'\xf2' hex.
See constant, static, final, primitive, IEEE 754.
little-endian
See endian
LiveConnect
A feature of Netscape 3.0 that allows JavaScript-to-Java and Java-to-JavaScript communication. Because Java is a strongly typed language with a large number of data types and JavaScript is an untyped language with relatively few types, LiveConnect provides the necessary data conversions, or wrappers in the case of objects. Java uses the JSObject Class for all object conversions, and JavaScript uses a variety of JavaClass objects, JavaObject objects, JavaMethod objects, etc. Using LiveConnect, JavaScript programs can interact with Java applets, Java-enabled Navigator plug-ins, and built-in Java system classes on the browser. As well, applets and Java-enabled plug-ins can interact with JavaScript, invoking functions and reading and writing properties. Internet Explorer 3.0 does not support LiveConnect, dealing with Java applets instead as ActiveX objects. The ActiveX interface provides only some of the capabilities of LiveConnect.
local variable
a variable declared inside a method that lives only while that method is executing. A variable not a class variable nor an instance variable. Some Java compilers have a limit of only 31 local variables per method. Watch out.
locale
a geographic or political region that shares the same language and customs. Programs can be customised to a language, country and style. Locales have been given standard identifiers, e.g. Locale.CANADA_FRENCH, Locale.FRANCE, CANADA_US
localhost
"localhost" and "127.0.0.1" are the DNS (Domain Name Service and IP (Internet Protocol) names for the local machine. See DNS.
location
The x,y co-ordinates of the upper left corner of a component in the parent component's co-ordinate space.
logo
To put the Netscape logo on your web page, see their Netscape Now Program. To put Microsoft's Internet Explorer logo on your web page, see their GetLogo Program.
Netscape IE
Click to download the latest browser software.
loop, endless
See endless loop.
loopback
When you test modems, you can ask a remote modem to send back the same test message you send it. This is called remote loopback. To localize the problem, you might then ask the local modem to echo back to the computer the message sent to it, without sending it out to the remote modem. This is called local loopback.



HTML Checked! award
Canadian Mind Products The Mining Company's
Focus on Java
Best of the Net Award
You can get an updated copy of this page from http://mindprod.com/jglossl.html