Java Reference
In-Depth Information
Table 14-9
Collection Operations (continued)
Return Type
Name
Description
Boolean
contains (Object)
Returns true if this collection contains the speci-
fied object; otherwise, returns false . Returns this
Collection.
Set
intersect (Collection)
Returns a new Set, containing only the elements
contained in this and the specified Collection.
Set
without (Collection)
Returns a new Set, containing all elements from
this Collection without the elements from the
specified Collection.
List
flatten ()
Returns a flattened List.
Set
union (Collection)
Returns a new Set, containing all elements from
this and the specified Collection.
Collection
add (Object)
Adds an element to the Collection and returns this
Collection.
Table 14-10
List Operations
Return Type
Name
Description
Object
last ()
Returns the last Object in the List
Object
first ()
Returns the first Object in the List
Integer
indexOf (Object)
Returns the index of the specified Object in the List
Object
get (Integer)
Returns the Object at the specified index
List
withoutLast ()
Returns the list without its last Object
List
withoutFirst ()
Returns the list without its first Object
The supertype of Type is Object.
Table 14-11
Type Properties
Type
Name
Description
String
name
The name of the Object
Set
superTypes
The Set of Object supertypes
Set
allProperties
The Set of all Object Properties
 
Search WWH ::




Custom Search