XPRSnamelist
- java.lang.Object
-
- com.dashoptimization.XPRSobject
-
- com.dashoptimization.XPRSnamelist
-
public class XPRSnamelist extends XPRSobject
Class allowing access to a name list
-
-
Constructor Summary
Constructor and Description XPRSnamelist()
Creates a new name list managed by the optimizer.
-
Method Summary
Modifier and Type Method and Description void
addMsgHandlerListener(XPRSmsgHandlerListener listener)
Add a listener for the MsgHandlercallback.void
addMsgHandlerListener(XPRSmsgHandlerListener listener, int priority)
Add the listener for the MsgHandlercallback.void
addMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data)
Add the listener for the MsgHandlercallback.void
addMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data, int priority)
Add the listener for the MsgHandlercallback.void
addNames(java.lang.String[] buf, int firstIndex)
void
addNames(java.lang.String[] buf, int firstIndex, int lastIndex)
void
copyNames(XPRSnamelist src)
void
destroy()
Deallocates resources associated with an XPRSobjectint
findName(java.lang.String name)
void
findName(java.lang.String name, IntHolder r_index)
java.lang.String
getLastError()
Returns last error message that occurred on this XPRSobjectjava.lang.String
getLastError(IntHolder iMsgCode)
int
getMaxNameLen()
int
getNameCount()
java.lang.String[]
getNames()
java.lang.String[]
getNames(int firstIndex, int lastIndex)
void
getNames(int padlen, java.lang.String[] buf, int firstIndex, int lastIndex)
void
getNames(java.lang.String[] buf, int firstIndex, int lastIndex)
void
removeMsgHandlerListener()
Removes all MsgHandler listeners from the object.void
removeMsgHandlerListener(XPRSmsgHandlerListener listener)
Removes the given MsgHandler listener from the object.void
removeMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data)
Removes the given MsgHandler listener with the given data value from the object.void
removeMsgHandlerListeners()
Remove all listeners for the MsgHandler callbackvoid
removeNames(int firstIndex, int lastIndex)
-
Methods inherited from class com.dashoptimization.XPRSobject
addMsgHandlerListener, addMsgHandlerListener, isDestroyed
-
-
-
-
Constructor Detail
-
XPRSnamelist
public XPRSnamelist() throws XPRSexception
Creates a new name list managed by the optimizer. XPRS.Init must have been called first.- Throws:
-
XPRSexception
-
-
Method Detail
-
getNames
public void getNames(int padlen, java.lang.String[] buf, int firstIndex, int lastIndex) throws XPRSexception
- Throws:
-
XPRSexception
-
getNames
public void getNames(java.lang.String[] buf, int firstIndex, int lastIndex) throws XPRSexception
- Throws:
-
XPRSexception
-
getNames
public java.lang.String[] getNames(int firstIndex, int lastIndex) throws XPRSexception
- Throws:
-
XPRSexception
-
getNames
public java.lang.String[] getNames() throws XPRSexception
- Throws:
-
XPRSexception
-
addNames
public void addNames(java.lang.String[] buf, int firstIndex, int lastIndex) throws XPRSexception
- Throws:
-
XPRSexception
-
addNames
public void addNames(java.lang.String[] buf, int firstIndex) throws XPRSexception
- Throws:
-
XPRSexception
-
destroy
public void destroy() throws XPRSexception
Description copied from class:XPRSobject
Deallocates resources associated with an XPRSobject- Specified by:
-
destroy
in classXPRSobject
- Throws:
-
XPRSexception
-
getNameCount
public int getNameCount() throws XPRSexception
- Throws:
-
XPRSexception
-
getMaxNameLen
public int getMaxNameLen() throws XPRSexception
- Throws:
-
XPRSexception
-
removeNames
public void removeNames(int firstIndex, int lastIndex) throws XPRSexception
- Throws:
-
XPRSexception
-
findName
public void findName(java.lang.String name, IntHolder r_index) throws XPRSexception
- Throws:
-
XPRSexception
-
findName
public int findName(java.lang.String name) throws XPRSexception
- Throws:
-
XPRSexception
-
copyNames
public void copyNames(XPRSnamelist src) throws XPRSexception
- Throws:
-
XPRSexception
-
getLastError
public java.lang.String getLastError() throws XPRSexception
Description copied from class:XPRSobject
Returns last error message that occurred on this XPRSobject- Specified by:
-
getLastError
in classXPRSobject
- Throws:
-
XPRSexception
-
getLastError
public java.lang.String getLastError(IntHolder iMsgCode) throws XPRSexception
- Throws:
-
XPRSexception
-
addMsgHandlerListener
public void addMsgHandlerListener(XPRSmsgHandlerListener listener) throws XPRSexception
Add a listener for the MsgHandlercallback. Note that an object can have multiple MsgHandler listeners.- Specified by:
-
addMsgHandlerListener
in classXPRSobject
- Parameters:
-
listener
- The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.) - Throws:
-
XPRSexception
-
addMsgHandlerListener
public void addMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data) throws XPRSexception
Add the listener for the MsgHandlercallback. Note that an object can have multiple MsgHandler listeners.- Specified by:
-
addMsgHandlerListener
in classXPRSobject
- Parameters:
-
listener
- The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.) -
data
- An additional object which will be passed down to the callback function - Throws:
-
XPRSexception
-
addMsgHandlerListener
public void addMsgHandlerListener(XPRSmsgHandlerListener listener, int priority) throws XPRSexception
Add the listener for the MsgHandlercallback. Note that an object can have multiple MsgHandler listeners.- Parameters:
-
listener
- The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.) -
priority
- Listeners with higher priorities are called first - Throws:
-
XPRSexception
-
addMsgHandlerListener
public void addMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data, int priority) throws XPRSexception
Add the listener for the MsgHandlercallback. Note that an object can have multiple MsgHandler listeners.- Parameters:
-
listener
- The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.) -
data
- An additional object which will be passed down to the callback function -
priority
- Listeners with higher priorities are called first - Throws:
-
XPRSexception
-
removeMsgHandlerListener
public void removeMsgHandlerListener(XPRSmsgHandlerListener listener) throws XPRSexception
Removes the given MsgHandler listener from the object.- Throws:
-
XPRSexception
-
removeMsgHandlerListener
public void removeMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data) throws XPRSexception
Removes the given MsgHandler listener with the given data value from the object.- Throws:
-
XPRSexception
-
removeMsgHandlerListener
public void removeMsgHandlerListener() throws XPRSexception
Removes all MsgHandler listeners from the object. @deprecated as of Xpress 7.1, please useremoveMsgHandlerListener(XPRSmsgHandlerListener)
orremoveMsgHandlerListeners()
- Specified by:
-
removeMsgHandlerListener
in classXPRSobject
- Throws:
-
XPRSexception
-
removeMsgHandlerListeners
public void removeMsgHandlerListeners() throws XPRSexception
Remove all listeners for the MsgHandler callback- Throws:
-
XPRSexception
-
-