com.vhosting.netconf.frame
Class List

java.lang.Object
  extended by com.vhosting.netconf.frame.Identity
      extended by com.vhosting.netconf.frame.ListReference
          extended by com.vhosting.netconf.frame.List
All Implemented Interfaces:
Clearable, Node

public class List
extends ListReference
implements Node, Clearable

This class represents a list in the PRC structure. A list is a special element that can be linked to any other element to create complex structures. A list is the most complex structure within the PRC structure. It's very similar to a container with not presence, but allows the assignment of their sub elements to a minimum to a maximum of times. Can be connected to a list elements such as:

 Leaf, LeafList, Anyxml, ContainerReference, ListReference.
 

Version:
1.00, 09/10/2010
Author:
Giuseppe Palmeri

Field Summary
 
Fields inherited from class com.vhosting.netconf.frame.Identity
name, namespaceURI, prefix
 
Constructor Summary
List(Capability cap, java.lang.String name)
          Create a list.
List(Capability cap, java.lang.String name, long min)
          Create a list.
List(Capability cap, java.lang.String name, long min, long max)
          Create a list.
 
Method Summary
 void assign(ListValue[] lv)
          Assign the set of values for this list.
 void clear()
          Remove all assignments of values made up for himself or on their sub elements in a recursive manner.
 ListValue createListValue()
          Create an instance of ListValue compatible with this list.
 ListValue[] getValues()
          Get all instances of ListValue associated with the list.
 boolean hasValues()
          Check if assignments were made up for himself or on their sub elements in a recursive manner.
 
Methods inherited from class com.vhosting.netconf.frame.ListReference
getMaximum, getMinimum, linkAnyxml, linkContainerReference, linkLeaf, linkLeafList, linkListReference
 
Methods inherited from class com.vhosting.netconf.frame.Identity
getName, getNamespaceURI, getPrefix, getUniqueNane
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vhosting.netconf.frame.Node
linkAnyxml, linkLeaf, linkLeafList
 

Constructor Detail

List

public List(Capability cap,
            java.lang.String name,
            long min,
            long max)
Create a list.

Parameters:
cap - The capability that this list reference belongs.
name - The name of the list.
min - The minimum limit of set of assignments which can be assigned.
max - The maximum limit of set of assignments which can be assigned.

List

public List(Capability cap,
            java.lang.String name,
            long min)
Create a list.

Parameters:
cap - The capability that this list reference belongs.
name - The name of the list.
min - The minimum limit of set of assignments which can be assigned.

List

public List(Capability cap,
            java.lang.String name)
Create a list.

Parameters:
cap - The capability that this list reference belongs.
name - The name of the list.
Method Detail

clear

public void clear()
Description copied from interface: Clearable
Remove all assignments of values made up for himself or on their sub elements in a recursive manner.

Specified by:
clear in interface Clearable

hasValues

public boolean hasValues()
Description copied from interface: Clearable
Check if assignments were made up for himself or on their sub elements in a recursive manner.

Specified by:
hasValues in interface Clearable

createListValue

public ListValue createListValue()
Create an instance of ListValue compatible with this list. A ListValue instance is an assignment of the whole structure of a list.

Returns:
An empty ListValue instance compatible with this list.

assign

public void assign(ListValue[] lv)
Assign the set of values for this list.

Parameters:
lv - An array of ListValue instances.

getValues

public ListValue[] getValues()
Get all instances of ListValue associated with the list. They represent the different assignments for the same list. All together they represent the assignments of the list.

Returns:
All instances of ListValue associated with the list.