jp.go.aist.rtm.RTC.util
Class CORBA_SeqUtil

java.lang.Object
  extended by jp.go.aist.rtm.RTC.util.CORBA_SeqUtil

public class CORBA_SeqUtil
extends java.lang.Object

Utility class to CORBA sequence.

Each method is not thread-safe. Please do the exclusive operation appropriately if necessary on the call side.


Constructor Summary
CORBA_SeqUtil()
           
 
Method Summary
static NameValue back(NVListHolder seq)
           Get the last element of the CORBA sequence
static void clear(NVListHolder seq)
           Erase all the elements of the CORBA sequence
static void erase_if(NVListHolder seq, equalFunctor func)
           Remove an element of a sequence according to a predicate
static void erase_if(PortServiceListHolder seq, equalFunctor f)
           Remove an element of a sequence according to a predicate
static void erase(ConnectorProfileListHolder seq, int index)
           Erase the element of the specified index
static void erase(ExecutionContextServiceListHolder seq, int index)
           Erase the element of the specified index
static void erase(ManagerListHolder seq, int index)
           Erase the element of the specified index
static void erase(NVListHolder seq, int index)
           Erase the element of the specified index
static void erase(OrganizationListHolder seq, int index)
           Erase the element of the specified index
static void erase(PortInterfaceProfileListHolder seq, int index)
           Erase the element of the specified index
static void erase(PortServiceListHolder seq, int index)
           Erase the element of the specified index
static void erase(RTCListHolder seq, int index)
           Erase the element of the specified index
static void erase(SDOListHolder seq, int index)
           Erase the element of the specified index
static void erase(ServiceProfileListHolder seq, int index)
           Erase the element of the specified index
static int find(ConnectorProfileListHolder seq, equalFunctor f)
           Return the index of CORBA sequence element that functor matches
static int find(ExecutionContextServiceListHolder seq, equalFunctor f)
           Return the index of CORBA sequence element that functor matches
static int find(ManagerListHolder seq, equalFunctor f)
           Return the index of CORBA sequence element that functor matches
static int find(NVListHolder seq, equalFunctor func)
           Return the index of CORBA sequence element that functor matches
static int find(PortInterfaceProfileListHolder seq, equalFunctor func)
           Return the index of CORBA sequence element that functor matches
static int find(PortServiceListHolder seq, equalFunctor func)
           Return the index of CORBA sequence element that functor matches
static int find(RTCListHolder seq, equalFunctor f)
           Return the index of CORBA sequence element that functor matches
static operatorFunc for_each(ConnectorProfileListHolder seq, operatorFunc func)
           Apply the functor to all CORBA sequence elements
static operatorFunc for_each(ExecutionContextServiceListHolder seq, operatorFunc func)
           Apply the functor to all CORBA sequence elements
static operatorFunc for_each(NVListHolder seq, operatorFunc func)
           Apply the functor to all CORBA sequence elements
static operatorFunc for_each(PortServiceListHolder seq, operatorFunc func)
           Apply the functor to all CORBA sequence elements
static NameValue front(NVListHolder seq)
           Get the front element of the CORBA sequence
static void insert(NVListHolder seq, NameValue elem, int index)
           Inserts the NameValue object in the specified position in the sequence.
static void push_back_list(ComponentProfileListHolder seq1, ComponentProfileListHolder seq2)
           Adds another RTC.ComponentProfile object sequence to the end of the sequence.
static void push_back_list(ModuleProfileListHolder seq1, ModuleProfileListHolder seq2)
           Adds another RTM.ModuleProfile object sequence to the end of the sequence.
static void push_back_list(NVListHolder seq1, NVListHolder seq2)
           Adds another NameValue object sequence to the end of the sequence.
static void push_back_list(RTCListHolder seq1, RTCListHolder seq2)
           Adds another RTC.RTObject object sequence to the end of the sequence.
static void push_back_list(SDOListHolder seq1, SDOListHolder seq2)
           Adds another _SDOPackage.SDO object sequence to the end of the sequence.
static void push_back(ComponentProfileListHolder seq, ComponentProfile elem)
           Adds ComponentProfile at the end of CORBA sequence.
static void push_back(ConnectorProfileListHolder seq, ConnectorProfile elem)
           Adds ConnectorProfile at the end of CORBA sequence.
static void push_back(ExecutionContextListHolder seq, ExecutionContext elem)
           Adds ExecutionContext at the end of CORBA sequence.
static void push_back(ExecutionContextServiceListHolder seq, ExecutionContextService elem)
           Adds ExecutionContextService at the end of CORBA sequence.
static void push_back(ManagerListHolder seq, Manager elem)
           Adds RTM.Manager at the end of CORBA sequence.
static void push_back(NVListHolder seq, NameValue elem)
           Adds NameValue at the end of CORBA sequence.
static void push_back(OrganizationListHolder seq, Organization elem)
           Adds Organization at the end of CORBA sequence.
static void push_back(PortInterfaceProfileListHolder seq, PortInterfaceProfile elem)
           Adds PortInterfaceProfile at the end of CORBA sequence.
static void push_back(PortProfileListHolder seq, PortProfile elem)
           Adds PortInterfaceProfile at the end of CORBA sequence.
static void push_back(PortServiceListHolder seq, PortService elem)
           Adds PortService at the end of CORBA sequence.
static void push_back(RTCListHolder seq, RTObject elem)
           Adds RTObject at the end of CORBA sequence.
static void push_back(SDOListHolder seq, SDO elem)
           Adds SDO at the end of CORBA sequence.
static void push_back(ServiceProfileListHolder seq, ServiceProfile elem)
           Adds ServiceProfile at the end of CORBA sequence.
static
<T> java.util.Vector<java.lang.String>
refToVstring(T[] objlist)
           converts the object into IOR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CORBA_SeqUtil

public CORBA_SeqUtil()
Method Detail

for_each

public static operatorFunc for_each(NVListHolder seq,
                                    operatorFunc func)
Apply the functor to all CORBA sequence elements

Apply the given functor to the given CORBA sequence.

Parameters:
seq - NVListHolder object that hold NameValue object sequence internally.
func - OperatorFunc object applied to each NameValue object
Returns:
OperatorFunc object specified by argument

for_each

public static operatorFunc for_each(ConnectorProfileListHolder seq,
                                    operatorFunc func)
Apply the functor to all CORBA sequence elements

Apply the given functor to the given CORBA sequence.

Parameters:
seq - ConnectorProfileHolder object that hold ConnectorProfile object sequence internally.
func - OperatorFunc object applied to each ConnectorProfile object
Returns:
OperatorFunc object specified by argument

for_each

public static operatorFunc for_each(ExecutionContextServiceListHolder seq,
                                    operatorFunc func)
Apply the functor to all CORBA sequence elements

Apply the given functor to the given CORBA sequence.

Parameters:
seq - ExecutionContextServiceListHolder object that hold ExecutionContextService object sequence internally.
func - OperatorFunc object applied to each ExecutionContextService object
Returns:
OperatorFunc object specified by argument

for_each

public static operatorFunc for_each(PortServiceListHolder seq,
                                    operatorFunc func)
Apply the functor to all CORBA sequence elements

Apply the given functor to the given CORBA sequence.

Parameters:
seq - PortServiceListHolder object that hold PortServiceListHolder object sequence internally.
func - OperatorFunc object applied to each PortServiceListHolder object
Returns:
OperatorFunc object specified by argument

find

public static int find(NVListHolder seq,
                       equalFunctor func)
Return the index of CORBA sequence element that functor matches

Parameters:
seq - NVListHolderHolder object that hold NameValue object sequence internally.
func - equalFunctor object that does agreement judgment
Returns:
When the agreeing NameValue object exists, the index in the sequence of the object is returned. When the agreeing NameValue object doesn't exist, -1 is returned.

find

public static int find(PortServiceListHolder seq,
                       equalFunctor func)
Return the index of CORBA sequence element that functor matches

Parameters:
seq - PortServiceListHolder object that hold Port object sequence internally.
func - equalFunctor object that does agreement judgment
Returns:
When the agreeing Port object exists, the index in the sequence of the object is returned. When the agreeing Port object doesn't exist, -1 is returned.

find

public static int find(PortInterfaceProfileListHolder seq,
                       equalFunctor func)
Return the index of CORBA sequence element that functor matches

Parameters:
seq - PortInterfaceProfileListHolder object that hold PortInterfaceProfile object sequence internally.
func - equalFunctor object that does agreement judgment
Returns:
When the agreeing PortInterfaceProfile object exists, the index in the sequence of the object is returned. When the agreeing PortInterfaceProfile object doesn't exist, -1 is returned.

find

public static int find(ConnectorProfileListHolder seq,
                       equalFunctor f)
Return the index of CORBA sequence element that functor matches

Parameters:
seq - ConnectorProfileListHolder object that hold ConnectorProfile object sequence internally.
f - equalFunctor object that does agreement judgment
Returns:
When the agreeing ConnectorProfile object exists, the index in the sequence of the object is returned. When the agreeing ConnectorProfile object doesn't exist, -1 is returned.

find

public static int find(ExecutionContextServiceListHolder seq,
                       equalFunctor f)
Return the index of CORBA sequence element that functor matches

Parameters:
seq - ExecutionContextServiceListHolder object that hold ExecutionContextService object sequence internally.
f - equalFunctor object that does agreement judgment
Returns:
When the agreeing ExecutionContextService object exists, the index in the sequence of the object is returned. When the agreeing ExecutionContextService object doesn't exist, -1 is returned.

find

public static int find(ManagerListHolder seq,
                       equalFunctor f)
Return the index of CORBA sequence element that functor matches

Parameters:
seq - RTM.ManagerListHolder object that hold RTM.Manager object sequence internally.
f - equalFunctor object that does agreement judgment
Returns:
When the agreeing RTM.Manager object exists, the index in the sequence of the object is returned. When the agreeing RTM.Manager object doesn't exist, -1 is returned.

find

public static int find(RTCListHolder seq,
                       equalFunctor f)
Return the index of CORBA sequence element that functor matches

Parameters:
seq - RTC.RTCListHolder object that hold RTC.RTC object sequence internally.
f - equalFunctor object that does agreement judgment
Returns:
When the agreeing RTC.RTC object exists, the index in the sequence of the object is returned. When the agreeing RTC.RTC object doesn't exist, -1 is returned.

push_back

public static void push_back(NVListHolder seq,
                             NameValue elem)
Adds NameValue at the end of CORBA sequence.

Parameters:
seq - NVListHolder object that adds NameValue object.
elem - NameValue to be added to the CORBA sequence.

push_back

public static void push_back(ServiceProfileListHolder seq,
                             ServiceProfile elem)
Adds ServiceProfile at the end of CORBA sequence.

Parameters:
seq - ServiceProfileListHolder object that adds ServiceProfile object.
elem - ServiceProfile to be added to the CORBA sequence.

push_back

public static void push_back(OrganizationListHolder seq,
                             Organization elem)
Adds Organization at the end of CORBA sequence.

Parameters:
seq - OrganizationListHolder object that adds Organization object.
elem - Organization to be added to the CORBA sequence.

push_back

public static void push_back(ExecutionContextServiceListHolder seq,
                             ExecutionContextService elem)
Adds ExecutionContextService at the end of CORBA sequence.

Parameters:
seq - ExecutionContextServiceListHolder object that adds ExecutionContextService object.
elem - ExecutionContextService to be added to the CORBA sequence.

push_back

public static void push_back(PortServiceListHolder seq,
                             PortService elem)
Adds PortService at the end of CORBA sequence.

Parameters:
seq - PortServiceListHolder object that adds PortService object.
elem - PortService to be added to the CORBA sequence.

push_back

public static void push_back(ConnectorProfileListHolder seq,
                             ConnectorProfile elem)
Adds ConnectorProfile at the end of CORBA sequence.

Parameters:
seq - ConnectorProfileListHolder object that adds ConnectorProfile object.
elem - ConnectorProfile to be added to the CORBA sequence.

push_back

public static void push_back(PortInterfaceProfileListHolder seq,
                             PortInterfaceProfile elem)
Adds PortInterfaceProfile at the end of CORBA sequence.

Parameters:
seq - PortInterfaceProfileListHolder object that adds PortInterfaceProfile object.
elem - PortInterfaceProfile to be added to the CORBA sequence.

push_back

public static void push_back(PortProfileListHolder seq,
                             PortProfile elem)
Adds PortInterfaceProfile at the end of CORBA sequence.

Parameters:
seq - PortProfileListHolder object that adds PortProfile object.
elem - PortProfile to be added to the CORBA sequence.

push_back

public static void push_back(ExecutionContextListHolder seq,
                             ExecutionContext elem)
Adds ExecutionContext at the end of CORBA sequence.

Parameters:
seq - ExecutionContextListHolder object that adds ExecutionContext object.
elem - ExecutionContext to be added to the CORBA sequence.

push_back

public static void push_back(SDOListHolder seq,
                             SDO elem)
Adds SDO at the end of CORBA sequence.

Parameters:
seq - SDOListHolder object that adds SDO object.
elem - SDO to be added to the CORBA sequence.

push_back

public static void push_back(ComponentProfileListHolder seq,
                             ComponentProfile elem)
Adds ComponentProfile at the end of CORBA sequence.

Parameters:
seq - ComponentProfileListHolder object that adds ComponentProfile object.
elem - ComponentProfile to be added to the CORBA sequence.

push_back

public static void push_back(RTCListHolder seq,
                             RTObject elem)
Adds RTObject at the end of CORBA sequence.

Parameters:
seq - RTCListHolder object that adds RTObject object.
elem - RTObject to be added to the CORBA sequence.

push_back

public static void push_back(ManagerListHolder seq,
                             Manager elem)
Adds RTM.Manager at the end of CORBA sequence.

Parameters:
seq - RTM.ManagerListHolder object that adds RTM.Manager object.
elem - RTM.Manager to be added to the CORBA sequence.

push_back_list

public static void push_back_list(NVListHolder seq1,
                                  NVListHolder seq2)
Adds another NameValue object sequence to the end of the sequence.

Parameters:
seq1 - It is added to this NVListHolder object.
seq2 - This NVListHolder object is added.

push_back_list

public static void push_back_list(SDOListHolder seq1,
                                  SDOListHolder seq2)
Adds another _SDOPackage.SDO object sequence to the end of the sequence.

Parameters:
seq1 - It is added to this SDOListHolder object.
seq2 - This SDOListHolder object is added.

push_back_list

public static void push_back_list(ModuleProfileListHolder seq1,
                                  ModuleProfileListHolder seq2)
Adds another RTM.ModuleProfile object sequence to the end of the sequence.

Parameters:
seq1 - It is added to this RTM.ModuleProfileListHolder object.
seq2 - This RTM.ModuleProfileListHolder object is added.

push_back_list

public static void push_back_list(RTCListHolder seq1,
                                  RTCListHolder seq2)
Adds another RTC.RTObject object sequence to the end of the sequence.

Parameters:
seq1 - It is added to this RTC.RTCListHolder object.
seq2 - This RTC.RTCListHolder object is added.

push_back_list

public static void push_back_list(ComponentProfileListHolder seq1,
                                  ComponentProfileListHolder seq2)
Adds another RTC.ComponentProfile object sequence to the end of the sequence.

Parameters:
seq1 - It is added to this RTC.ComponentProfileListHolder object.
seq2 - This RTC.ComponentProfileListHolder object is added.

insert

public static void insert(NVListHolder seq,
                          NameValue elem,
                          int index)
Inserts the NameValue object in the specified position in the sequence.

Parameters:
seq - NVListHolder object.
elem - NameValue object
index - Index that indicates insertion destination

front

public static NameValue front(NVListHolder seq)
Get the front element of the CORBA sequence

Parameters:
seq - CORBA sequence which acquires an element
Returns:
An acquisition element

back

public static NameValue back(NVListHolder seq)
Get the last element of the CORBA sequence

Parameters:
seq - The CORBA sequence to be get the element
Returns:
An acquisition element

erase

public static void erase(NVListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase

public static void erase(SDOListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase

public static void erase(ServiceProfileListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase

public static void erase(OrganizationListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase

public static void erase(PortServiceListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase

public static void erase(ConnectorProfileListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase

public static void erase(PortInterfaceProfileListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase

public static void erase(ExecutionContextServiceListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase

public static void erase(ManagerListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase

public static void erase(RTCListHolder seq,
                         int index)
Erase the element of the specified index

Parameters:
seq - The CORBA sequence to be get the element
index - The index of the element to be removed

erase_if

public static void erase_if(NVListHolder seq,
                            equalFunctor func)
Remove an element of a sequence according to a predicate

Parameters:
seq - target CORBA sequence
func - predicate which decides a sequence to remove

erase_if

public static void erase_if(PortServiceListHolder seq,
                            equalFunctor f)
Remove an element of a sequence according to a predicate

Parameters:
seq - target CORBA sequence
f - predicate which decides a sequence to remove

clear

public static void clear(NVListHolder seq)
Erase all the elements of the CORBA sequence

Parameters:
seq - NVListHolder object

refToVstring

public static <T> java.util.Vector<java.lang.String> refToVstring(T[] objlist)
converts the object into IOR

Parameters:
objlist - List of object
Returns:
Vector List of character string