Implementing RoleUnresolvedList API in Java
An API is an acronym for Application Programming Interface, it is software that allows two applications to communicate with each other. RoleUnresolvedList represents the list of RoleUnresolved Object and RoleUnresolved Object represents the roles that are not retrieved from a relationship due to some problem encountered when trying to access read or write the roles. Thus, RoleUnresolvedList API is a program that communicates with the internal file to retrieve the object meaning and represents the roles which is not retrieved from relation due to some problem.
(A) Packages: In the RoleUnresolvedList API program in java, various Packages are used in order to retrieve the meaning and use of an object which is used in the program. Below Images shows the packages imported in the program:
import java.util.Collection; import java.util.LinkedList; import java.util.List; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.management.relation.RoleUnresolved; import javax.management.relation.RoleUnresolvedList;
NOTE: In Order to move further, please go through the following Packages for better Understanding.
(B) Constructor’s Used
- RoleUnresolvedList(): It is used to Construct Empty RoleUnresolvedList.
- RoleUnresolvedList(int initialCapacity): It is used to Construct an Empty RoleUnresolvedList with Initial Capacity specified.
- RoleUnresolvedListImpl(List<RoleUnresolved> list): It is used to Construct RoleUnresolvedList containing elements of the list specified. It is Constructed in order to which they are returned by List Iterator.
- add(int index, Object element): This Method is used to insert the specific element in a specific position.
- add(int index, RoleUnresolved role): This method inserts the Unresolved role specified as an element at the specified position.
- add(Object o): It appends the specified element at the end of the list.
- add(RoleUnresolved role): It will add the RoleUnresolved specified at the last element of the list.
- addAll(Collection<?> c): It will append the elements in the specified list at the end.
- addAll(int index, Collection<?> c): It will insert the elements at the specified location.
- addAll(int index, RoleUnresolvedList roleList): Inserts all the elements in the RoleUnresolvedList specified into this list, starting at the specified position, in the order in which they are returned by the Iterator of the RoleUnresolvedList specified.
role name: rolename1; value: domain1:key1=value1, domain2:key2=value2; problem type: 1 role name: rolename2; value: domain3:key3=value3, domain4:key4=value4; problem type: 2
Please Login to comment...