com.sage.accpac.sm
Interface Licenses

All Superinterfaces:
java.lang.Iterable<License>

public interface Licenses
extends java.lang.Iterable<License>

An object implementing this interface represents a collection of licenses and should be obtained from the Program object's getLicenses() method.

The collection contains only those entries that were present when getLicenses() was called.

Since the collection is iterable and the contents are immutable the easiest way to use the collection is in a for loop:

 for (License license : program.getLicenses())
 {
     process the license;
 }
 

See Also:
License

Method Summary
 License get(int index)
          Get the specified License object by its index in the collection.
 int getCount()
          Get the number of licenses in the list.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

get

License get(int index)
Get the specified License object by its index in the collection. You may want to consider iterating over the collection using an iterator rather than this method.

Parameters:
index - The zero-based index of the object in the collection.
Returns:
the License object
See Also:
getCount(), Iterable.iterator()

getCount

int getCount()
Get the number of licenses in the list. Note that the collection is iterable so you may not need to know how many there are; simply loop on the contents.
 for (License license : program.getLicenses())
 {
     process the license;
 }
 

Returns:
the number of licenses
See Also:
get(int), Iterable.iterator()


Copyright © 2011 Sage Software, Inc. All rights reserved.