A Role List represents a list of roles (Role objects). It is used as a parameter when creating a relation, and when attempting to set multiple roles in a relationship or via setRoles() method. It is returned as part of a RoleResult, to provide roles successfully obtain the role.
public class RoleList extends ArrayList<Object> ;
Methods for constructing a Role list
- Role List(): Constructs an empty Role List.
- Role List(int initial_capacity): Constructs an empty Role List with the initial capacity specified.
- Role List(List<Role> list): Constructs a Role List containing the elements of the List specified, in the order in which they are returned by the List’s iterator.
Implementation: All Implementable Interfaces are given below:
Java Program to Implement RoleList API
role name: 1_rolename; role value: domain1_:key1_=value1_, domain2_:key2_=value3_ role name: 2_rolename; role value: domain3_:key3_=value3_, domain4_:key4_=value4_
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.