code
stringlengths
10
174k
nl
stringlengths
3
129k
private void sortShellsAndHoles(List edgeRings,List shellList,List freeHoleList){ for (Iterator it=edgeRings.iterator(); it.hasNext(); ) { EdgeRing er=(EdgeRing)it.next(); if (er.isHole()) { freeHoleList.add(er); } else { shellList.add(er); } } }
For all rings in the input list, determine whether the ring is a shell or a hole and add it to the appropriate list. Due to the way the DirectedEdges were linked, a ring is a shell if it is oriented CW, a hole otherwise.
public EdgeString(GeometryFactory factory){ this.factory=factory; }
Constructs an EdgeString with the given factory used to convert this EdgeString to a LineString
public static Schematic load(File file) throws IOException { return ClipboardFormat.SCHEMATIC.load(file); }
Just forwards to ClipboardFormat.SCHEMATIC.load(file)
private void deleteDataPage(CacheDataPage cacheDataPage) throws IOException { getPageChannel().deallocatePage(cacheDataPage._main._pageNumber); _dataPages.remove(cacheDataPage._main._pageNumber); cacheDataPage._extra._modified=false; }
Deletes the given index page from the file (clears the page).
private void testHasChildren() throws Exception { LOG.info("hasChildren"); String oldName; for ( MailboxPath path : pathsList) { final HBaseMailbox mailbox=new HBaseMailbox(path,12455); oldName=mailbox.getName(); if (path.getUser().equals("user3")) { mailbox.setName("test"); } boolean r...
Test of hasChildren method, of class HBaseMailboxMapper.
private void updateProgress(String progressLabel,int progress){ if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) { myHost.updateProgress(progressLabel,progress); } previousProgress=progress; previousProgressLabel=progressLabel; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
private void initDiagnostics(){ Class clazz=this.getClass(); ClassLoader classLoader=getClassLoader(clazz); String classLoaderName; try { if (classLoader == null) { classLoaderName="BOOTLOADER"; } else { classLoaderName=objectId(classLoader); } } catch ( SecurityException e) { c...
Calculate and cache a string that uniquely identifies this instance, including which classloader the object was loaded from. <p> This string will later be prefixed to each "internal logging" message emitted, so that users can clearly see any unexpected behaviour. <p> Note that this method does not detect whether intern...
@OnOpen public void onOpen(Session session) throws IOException { if (Boolean.parseBoolean(InitParametersInjector.get(InitParametersInjector.INIT_PARAM_ENABLE_ROLES))) { Principal principal=session.getUserPrincipal(); if (principal == null) { session.getBasicRemote().sendText("Login first to be able to u...
On open connection handler
private void completeMovement(){ if (m_movement != null) { getProcessInfo().setRecord_ID(m_movement.get_ID()); if (!m_movement.processIt(p_docAction)) log.warning("Failed: " + m_movement); m_movement.saveEx(); addLog(m_movement.getM_Movement_ID(),m_movement.getMovementDate(),null,m_movement.getDoc...
Complete Shipment
public boolean isAddGroupClasses(){ return addGroupClasses; }
Indica si se aniaden las clases de grupo al filtro
@SuppressWarnings("unchecked") public SortedSet<E> subSet(E start,E end){ return subSet(start,true,end,false); }
Answers a SortedSet of the specified portion of this TreeSet which contains elements greater or equal to the start element but less than the end element. The returned SortedSet is backed by this TreeSet so changes to one are reflected by the other.
public static String removeStyleAndColors(String text){ return cleanupPattern.matcher(text).replaceAll(""); }
Removes mIRC color and style codes and returns the message without them.
public boolean handleError(DOMError error){ boolean fail=true; String severity=null; if (error.getSeverity() == DOMError.SEVERITY_WARNING) { fail=false; severity="[Warning]"; } else if (error.getSeverity() == DOMError.SEVERITY_ERROR) { severity="[Error]"; } else if (error.getSeverity() == DO...
Implementation of DOMErrorHandler.handleError that adds copy of error to list for later retrieval.
@Deprecated public String toString(){ return name; }
Return log name as string representation.
public boolean approveIt(){ log.info(toString()); setIsApproved(true); return true; }
Approve Document
public final boolean removeElement(int s){ for (int i=0; i < m_firstFree; i++) { if (m_map[i] == s) { if ((i + 1) < m_firstFree) System.arraycopy(m_map,i + 1,m_map,i - 1,m_firstFree - i); else m_map[i]=java.lang.Integer.MIN_VALUE; m_firstFree--; return true; } } return false...
Removes the first occurrence of the argument from this vector. If the object is found in this vector, each component in the vector with an index greater or equal to the object's index is shifted downward to have an index one smaller than the value it had previously.
private void writeObject(ObjectOutputStream oos) throws IOException { oos.writeObject(type); oos.writeObject(Integer.valueOf(goalUse.useId)); if (goalDefinition != null) oos.writeObject(Integer.valueOf(goalDefinition.defId)); else oos.writeObject(0); }
Serialize, but need to abstract classloader away
public Matrix(int initRows,int initColumns){ rows=initRows; columns=initColumns; data=new byte[rows][]; for (int r=0; r < rows; r++) { data[r]=new byte[columns]; } }
Initialize a matrix of zeros.
public CompanyObject(int id){ this.id=id; }
This method was generated by MyBatis Generator. This method corresponds to the database table company
public boolean nonEmpty(){ return tail != null; }
Does list have elements?
@Override public List<ReilInstruction> translate(final ITranslationEnvironment environment,final InstructionType instruction,final List<ITranslationExtension<InstructionType>> extensions) throws InternalTranslationException { Preconditions.checkNotNull(environment,"Error: Argument environment can't be null"); Preco...
Translates an x86 instruction to REIL code
public String generateZipEntry(String file){ return file.substring(sourceDir.length() + 1,file.length()); }
Format the file path for zip
void jbInit() throws Exception { mainPanel.setLayout(mainLayout); displayPanel.setLayout(displayLayout); keyPanel.setLayout(keyLayout); mainLayout.setHgap(2); mainLayout.setVgap(2); mainPanel.setBorder(BorderFactory.createEmptyBorder(2,2,2,2)); mainPanel.addKeyListener(this); display.setBackground(Color...
Static init
private void saveName(){ try { m_module.getConfiguration().setName(m_stdEditPanel.getNameString()); } catch ( final CouldntSaveDataException e) { CUtilityFunctions.logException(e); final String message="E00160: " + "Could not change the module name"; final String description=CUtilityFunctions.crea...
Saves the module name to the database.
public void updateButtons(boolean verifyTargetName){ if (selectedTarget == null) { return; } if (selectedTarget.isConnected()) { sshView.setConnectButtonText("Disconnect"); } else { sshView.setConnectButtonText("Connect"); } if (!selectedTarget.isDirty()) { sshView.enableConnectButton(true)...
Updates buttons state.
public void adjust(final JBPopup popup){ adjust(popup,Position.RIGHT,Position.LEFT,Position.TOP,Position.BOTTOM); }
Try to position: 1. to the right 2. to the left 3. above 4. under
public String labelToClassName(String label,String prefix){ if (configuration.getBoolean(CONFIG_LABEL_AS_CLASSNAME,false)) { return label; } return label.equals(prefix) ? prefix : prefix + "_" + label; }
Convert a label to orientdb class name
public static void jenkins(final long[] triple,final long seed,final long[] h){ long a, b, c; a=b=seed; c=ARBITRARY_BITS; a+=triple[0]; b+=triple[1]; c+=triple[2]; a-=b; a-=c; a^=(c >>> 43); b-=c; b-=a; b^=(a << 9); c-=a; c-=b; c^=(b >>> 8); a-=b; a-=c; a^=(c >>> 38); b-=c; b-=a;...
SpookyHash 64-bit hashing (all three values produced) for a triple of longs.
@Override public void send(HandshakeIODataStream out){ int total_length=0; if (encoded_certs == null) { encoded_certs=new byte[certs.length][]; for (int i=0; i < certs.length; i++) { try { encoded_certs[i]=certs[i].getEncoded(); } catch ( CertificateEncodingException e) { f...
Sends message
public HaltonSequence(int base){ this.base=base; }
Creates a new instance with the specified base.
private static <T>void legacyMergeSort(T[] a,Comparator<? super T> c){ T[] aux=a.clone(); if (c == null) mergeSort(aux,a,0,a.length,0); else mergeSort(aux,a,0,a.length,0,c); }
To be removed in a future release.
public void invalidate(){ valid=false; }
If invalidated, will subsequently refuse to handle events. <p/> Should be called when the wrapped object is unregistered from the Bus.
public static final String normalizePath(String path){ String normalized=path; if (normalized.indexOf('\\') >= 0) { normalized=normalized.replace('\\','/'); } if (!normalized.startsWith("/")) { normalized="/" + normalized; } while (true) { int index=normalized.indexOf("//"); if (index < 0) ...
Return a context-relative path, beginning with a "/", that represents the canonical version of the specified path after ".." and "." elements are resolved out. If the specified path attempts to go outside the boundaries of the current context (i.e. too many ".." path elements are present), return <code>null</code> ins...
private void verifyCreateRight(Entity entity){ LOG.debug("VERIFYING CREATE RIGHT FOR " + entity); }
Checks access control to verify the right
public void populate(ResultSet data,int start) throws SQLException { throw new UnsupportedOperationException(); }
Populates this <code>CachedRowSet</code> object with data from the given <code>ResultSet</code> object. While related to the <code>populate(ResultSet)</code> method, an additional parameter is provided to allow starting position within the <code>ResultSet</code> from where to populate the CachedRowSet instance. This me...
public static DestinationAddressAttribute createDestinationAddressAttribute(TransportAddress address){ DestinationAddressAttribute attribute=new DestinationAddressAttribute(); attribute.setAddress(address); return attribute; }
Creates a DestinationFromAddressAttribute of the specified type and with the specified address and port
public static boolean isCSSStringCharacter(char c){ return c >= 128 || ((STRING[c >> 5] & (1 << (c & 0x1F))) != 0); }
Tests whether the given character is a valid string character.
private void processJournal() throws IOException { deleteIfExists(journalFileTmp); for (Iterator<Entry> i=lruEntries.values().iterator(); i.hasNext(); ) { Entry entry=i.next(); if (entry.currentEditor == null) { for (int t=0; t < valueCount; t++) { size+=entry.lengths[t]; } } else {...
Computes the initial size and collects garbage as a part of opening the cache. Dirty entries are assumed to be inconsistent and will be deleted.
private IntervalXYDataset createDataset1(){ TimeSeries series1=new TimeSeries("Series 1",Day.class); series1.add(new Day(1,MonthConstants.MARCH,2002),12353.3); series1.add(new Day(2,MonthConstants.MARCH,2002),13734.4); series1.add(new Day(3,MonthConstants.MARCH,2002),14525.3); series1.add(new Day(4,MonthConst...
Creates a sample dataset.
public void addWarning(int importance,String text,CSTNode context,SourceUnit source){ if (WarningMessage.isRelevant(importance,configuration.getWarningLevel())) { addWarning(new WarningMessage(importance,text,context,source)); } }
Convenience wrapper for addWarning() that won't create an object unless it is relevant.
public static Quantity fromValue(final long value){ return new Quantity(value); }
Creates a new quantity given a value.
private void installObject(DBObject obj,HashMap<String,DBObject> map,boolean logUntranslatableCustomization){ ArrayList<String> allDependencies=obj.getDependencies(); Collections.reverse(allDependencies); ArrayList<String> installableDependencies=new ArrayList<String>(); for (Iterator<String> it=allDependencies...
resolve dependencies and install those before installing actual object
private void saveMetadata(){ Path f=backupPath.resolve(META_FILE); try (BufferedWriter writer=Files.newBufferedWriter(f,CHARSET)){ writer.write(String.valueOf(number) + " " + String.valueOf(lastBackup)); } catch ( IOException|NumberFormatException ex) { LOGGER.warning("Error writing backup meta file: " ...
Saves the current meta information to a file.
public void ask(BaseQuestion question){ if (!question.getPartOfConversation()) { String result=get(initchat).asString(); System.out.println("*************************RESPONSE FROM INITCHAT: \n" + result + "\n"); JsonPath initChat=new JsonPath(result); question.setClientId(initChat.get(SetupMethod.CLIE...
ask - Ask question using RestAPI
@Override public String toString(){ StringBuffer temp=new StringBuffer(); temp.append("\nFarthestFirst\n==============\n"); temp.append("\nCluster centroids:\n"); for (int i=0; i < m_NumClusters; i++) { temp.append("\nCluster " + i + "\n\t"); for (int j=0; j < m_ClusterCentroids.numAttributes(); j++) { ...
return a string describing this clusterer
public StringConvert(){ this(true); }
Creates a new conversion manager including the JDK converters.
private int keyColumnEnd(){ int offset=0; for (int i=0; i < _columns.length; i++) { if (offset == _keyStart + _keyLength) { return i; } offset+=_columns[i].length(); } if (offset == _keyStart + _keyLength) { return _columns.length; } throw new IllegalStateException(); }
End key column index, the index after the final key.
@Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); if (savedInstanceState != null) { Log.d(TAG,"onCreate(): activity re-created"); } else { Log.d(TAG,"onCreate(): activity created anew"); } }
Hook method called when a new instance of Activity is created. One time initialization code should go here e.g. UI layout, some class scope variable initialization. if finish() is called from onCreate no other lifecycle callbacks are called except for onDestroy().
public void saveSession(){ board.saveSession(); }
Ask to save the game from a properties file with confirmation
public CreateId(){ super(KEY); }
Constructs an instance using the default key.
public GeolocSharing shareGeoloc(ContactId contact,Geoloc geoloc) throws RcsServiceNotRegisteredException, RcsPersistentStorageException, RcsServiceNotAvailableException, RcsGenericException { if (mApi == null) { throw new RcsServiceNotAvailableException(); } try { IGeolocSharing sharingIntf=mApi.shareGeo...
Shares a geolocation with a contact. An exception if thrown if there is no ongoing CS call. The parameter contact supports the following formats: MSISDN in national or international format, SIP address, SIP-URI or Tel-URI. If the format of the contact is not supported an exception is thrown.
static private String[] alphaMixed(){ return StringFunctions.combineStringArrays(StringFunctions.alphaLower,StringFunctions.alphaUpper); }
Combine the alpha lower and alpha upper collections into one
public static Event addEvent(String eventIdentifier,EventType eventType,TechnicalProduct tProd,DataService mgr) throws NonUniqueBusinessKeyException { Event evt=new Event(); evt.setEventIdentifier(eventIdentifier); evt.setEventType(eventType); evt.setTechnicalProduct(tProd); tProd.getEvents().add(evt); mgr....
Creates an event definition object for the given technical product.
public Quaternion slerp(Quaternion q1,Quaternion q2,float t){ if (q1.x == q2.x && q1.y == q2.y && q1.z == q2.z && q1.w == q2.w) { this.set(q1); return this; } float result=(q1.x * q2.x) + (q1.y * q2.y) + (q1.z * q2.z)+ (q1.w * q2.w); if (result < 0.0f) { q2.x=-q2.x; q2.y=-q2.y; q2.z=-q2.z; ...
<code>slerp</code> sets this quaternion's value as an interpolation between two other quaternions.
@Override public boolean eIsSet(int featureID){ switch (featureID) { case SGenPackage.FEATURE_TYPE__DEPRECATED: return deprecated != DEPRECATED_EDEFAULT; case SGenPackage.FEATURE_TYPE__COMMENT: return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment); case SGenPackage.FEATURE_TYPE__PA...
<!-- begin-user-doc --> <!-- end-user-doc -->
public void fireSelection(OMGraphic omg,DrawingToolRequestor dtr,boolean isSelected){ Vector<SelectionListener> targets; synchronized (this) { if (listeners == null) { return; } targets=(java.util.Vector<SelectionListener>)listeners.clone(); } SelectionEvent evt=new SelectionEvent(source,omg,dtr...
Send a selection event to all registered listeners.
public void testPreparedStatementGetString(Connection connection) throws SQLException { try (PreparedStatement preparedStatement=connection.prepareStatement(sql)){ try (ResultSet resultSet=preparedStatement.executeQuery()){ Assert.assertTrue(resultSet.next()); Assert.assertEquals("00:00:00.000000",res...
Check Time getString() answer using prepareStatement.
public ActionErrors validate(ActionMapping mapping,HttpServletRequest request){ ActionErrors errors=new ActionErrors(); if (StringUtils.isBlank(this.titulo)) errors.add(ActionErrors.GLOBAL_MESSAGE,new ActionError(Constants.ERROR_REQUIRED,Messages.getString(ValoracionConstants.LABEL_VALORACION_TITULO,request.getLo...
Valida el formulario
@Override public Object toBean(ResultSet rs,Class type) throws SQLException { return this.convert.toBean(rs,type); }
Convert a <code>ResultSet</code> row into a JavaBean. This implementation delegates to a BeanProcessor instance.
public final int readInt() throws IOException { mPosition+=4; d.readFully(w,0,4); return (w[3]) << 24 | (w[2] & 0xff) << 16 | (w[1] & 0xff) << 8 | (w[0] & 0xff); }
like DataInputStream.readInt except little endian.
public boolean isSubmitEventBean(){ return submitEventBean; }
Returns indicator whether to submit wrapped events (EventBean) or underlying events
public RunAutomaton(Automaton a,int maxInterval,boolean tableize){ this(a,maxInterval,tableize,Operations.DEFAULT_MAX_DETERMINIZED_STATES); }
Constructs a new <code>RunAutomaton</code> from a deterministic <code>Automaton</code>.
public AppSize(int width,int height){ mWidth=width; mHeight=height; }
Create a new immutable AppSize instance.
public void addSelectionListener(final SelectionListener listener){ checkWidget(); listeners.add(listener); }
Adds the listener to the collection of listeners who will be notified when the user changes the receiver's value, by sending it one of the messages defined in the <code>SelectionListener</code> interface. <p> <code>widgetSelected</code> is called when the user changes the receiver's value. <code>widgetDefaultSelected</...
public final static char[] encodeToChar(byte[] sArr,boolean lineSep){ int sLen=sArr != null ? sArr.length : 0; if (sLen == 0) return new char[0]; int eLen=(sLen / 3) * 3; int cCnt=((sLen - 1) / 3 + 1) << 2; int dLen=cCnt + (lineSep ? (cCnt - 1) / 76 << 1 : 0); char[] dArr=new char[dLen]; for (int s=0, d...
Encodes a raw byte array into a BASE64 <code>char[]</code> representation i accordance with RFC 2045.
private Result(final StructuredContent obj) throws IllegalArgumentException { if (obj == null) { throw new IllegalArgumentException("dom object cannot be null"); } this.root=obj; if (root.getParent() != null) { root=root.getParent(); } }
Internal method, do not use. Construct an evaluator object from a StructuredContent element.
@SuppressLint("NewApi") @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_ptr_webview); mPullRefreshWebView=(PullToRefreshWebView)findViewById(R.id.pull_refresh_webview); mWebView=mPullRefreshWebView.getRefreshableView(); mWebView.g...
Called when the activity is first created.
public static ComputeSystem queryRegisteredSystem(URI id,DbClient _dbClient,boolean isIdEmbeddedInURL){ ArgValidator.checkUri(id); ComputeSystem system=_dbClient.queryObject(ComputeSystem.class,id); ArgValidator.checkEntityNotNull(system,id,isIdEmbeddedInURL); if (!RegistrationStatus.REGISTERED.toString().equal...
Gets the compute system with the passed id from the database.
public Object clone() throws CloneNotSupportedException { return new ObjectVector(this); }
Returns clone of current ObjectVector
@Override public String toString(){ StringBuffer buff=new StringBuffer("StunFailureEvent:\n\tMessage="); buff.append(getMessage()); buff.append(" localAddr=").append(getLocalAddress()); return buff.toString(); }
Returns a <tt>String</tt> representation of this event, containing the corresponding message, and local address.
public ToStringBuilder append(final String fieldName,final double value){ style.append(buffer,fieldName,value); return this; }
<p>Append to the <code>toString</code> a <code>double</code> value.</p>
public PictureSizes computePictureSizes(){ List<Size> backCameraSizes=computeSizesForCamera(SettingsUtil.CAMERA_FACING_BACK); List<Size> frontCameraSizes=computeSizesForCamera(SettingsUtil.CAMERA_FACING_FRONT); Optional<SelectedVideoQualities> videoQualitiesBack=computeQualitiesForCamera(SettingsUtil.CAMERA_FACIN...
Computes the list of picture sizes that should be displayed by settings. <p> For this it will open the camera devices to determine the available sizes, if the sizes are not already cached. This is to be compatible with devices running Camera API 1. <p> We then calculate the resolutions that should be available and in t...
public void stateChanged(ChangeEvent e){ setButtons(); }
Invoked when the target of the listener has changed its state.
public static String vmVersion(MonitoredVm vm) throws MonitorException { StringMonitor ver=(StringMonitor)vm.findByName("java.property.java.vm.version"); return (ver == null) ? "Unknown" : ver.stringValue(); }
Return the Java Virtual Machine Version.
void jimplify(cp_info constant_pool[],int this_class){ Code_attribute codeAttribute=method.locate_code_attribute(); Set<Instruction> handlerInstructions=new ArraySet(); Map<Instruction,SootClass> handlerInstructionToException=new HashMap<Instruction,SootClass>(); Map<Instruction,TypeStack> instructionToTypeStac...
Main.v() entry point for converting list of Instructions to Jimple statements; performs flow analysis, constructs Jimple statements, and fixes jumps.
public CMiscPanel(final ZyGraphViewSettings settings,final boolean isCallgraph){ super(new GridLayout(3 + (isCallgraph ? 1 : 0),1)); Preconditions.checkNotNull(settings,"IE01590: Settings argument can not be null"); setBorder(new TitledBorder("Miscellaneous")); CSettingsPanelBuilder.addComboBox(this,gradientBac...
Creates a new miscellaneous settings panel.
@Override public void doInit() throws ResourceException { super.doInit(); if (isExisting()) { String flParam=getSolrRequest().getParams().get(CommonParams.FL); if (null != flParam) { String[] fields=flParam.trim().split("[,\\s]+"); if (fields.length > 0) { requestedFields=new LinkedHashS...
Pulls the "fl" param from the request and splits it to get the requested list of fields. The (Dynamic)FieldCollectionResource classes will then restrict the fields sent back in the response to those on this list. The (Dynamic)FieldResource classes ignore this list, since the (dynamic) field is specified in the URL p...
public static int supplemental(char h,char l){ return (h - 0xD800) * 0x400 + (l - 0xDC00) + 0x10000; }
Returns true the supplemental character corresponding to the given surrogates.
public static Optional<Notification> tryFind(@Nonnull final Iterable<Notification> notifications,final long id){ final com.google.common.base.Optional<Notification> result=Iterables.tryFind(notifications,null); if (result.isPresent()) { return Optional.of(result.get()); } return Optional.empty(); }
Return the parent notification that matches the given ID or is the parent of a child notification.
@Override public void followAgent(final IAgent a){ }
Method followAgent()
private boolean allowAutomaticLogPopup(){ Boolean allowed=TetradLogger.getInstance().isAutomaticLogDisplayEnabled(); if (allowed == null) { String message="<html>Whenever Tetrad's logging features are active any generated log <br>" + "output will be automatically display in Tetrad's log display. Would you like ...
States whether the log display should be automatically displayed, if there is no value in the user's prefs then it will display a prompt asking the user whether they would like to disable automatic popups.
public MergeManyValuesTest(String name){ super(name); }
Initializes the test.
public synchronized static void terminateCore() throws PayloadException, NetworkException, ContactManagerException { if (sInstance == null) { return; } sInstance.stopCore(); sInstance=null; }
Terminate the core
public boolean isInterface(){ return (accessFlags & AccessFlag.INTERFACE) != 0; }
Returns true if this is an interface.
public void score(int s){ score=s; }
External agent rates the board and stores the score here.
public static double[] fill(int m,double c){ double[] o=new double[m]; for (int i=0; i < o.length; i++) o[i]=c; return o; }
Provides an m element array filled with constant c. Example:<br> <code> double[] u = fill(3, 1.0);<br> Result is:<br> 1.0 1.0 1.0<br> </code>
@Override public boolean equals(Object o){ return o instanceof ApkPermissionGroup && this.getName().equals(((ApkPermissionGroup)o).getName()) && this.descriptions.size() == ((ApkPermissionGroup)o).descriptions.size(); }
The contains method was overridden to check if the object contains the same permissions size and name. Could be refactored to check if the permissions' list is the same.
private void sendSetConfigMessage(String key,String value){ log.info("sent SetConfig message with key = " + key + " and value = "+ value); coordinatorStreamSystemProducer.send(new SetConfig(CoordinatorStreamWriter.SOURCE,key,value)); }
This method sends message of type "set-config" to the coordinator stream
private void addCSSClasses(SVGPlot svgp){ final StyleLibrary style=context.getStyleLibrary(); if (!svgp.getCSSClassManager().contains(SELECTAXISVISIBILITY)) { CSSClass cls=new CSSClass(this,SELECTAXISVISIBILITY); cls.setStatement(SVGConstants.CSS_OPACITY_PROPERTY,0.1); cls.setStatement(SVGConstants.CSS_...
Adds the required CSS-Classes
public DisplayComposer with(){ return new DisplayComposer(); }
Return Composer instance to setup this Container instance. This method is useful when you use only default class of animation.
public MrcTurnout(int number,MrcTrafficController tc,String p){ super(p + "T" + number); _number=number; if (_number < NmraPacket.accIdLowLimit || _number > NmraPacket.accIdHighLimit) { throw new IllegalArgumentException("Turnout value: " + _number + " not in the range "+ NmraPacket.accIdLowLimit+ " to "+ Nmr...
Mrc turnouts use any address allowed as an accessory decoder address on the particular command station.
public String productSummary(MProduct product,boolean isLeaf){ MUOM uom=MUOM.get(getCtx(),product.getC_UOM_ID()); String value=product.getValue(); String name=product.get_Translation(MProduct.COLUMNNAME_Name); StringBuffer sb=new StringBuffer(value); if (name != null && !value.equals(name)) sb.append("_").a...
get Product Summary
private void fillPicks(){ String sql="SELECT M_PriceList_Version.M_PriceList_Version_ID," + " M_PriceList_Version.Name || ' (' || c.Iso_Code || ')' AS ValueName " + "FROM M_PriceList_Version, M_PriceList pl, C_Currency c "+ "WHERE M_PriceList_Version.M_PriceList_ID=pl.M_PriceList_ID"+ " AND pl.C_Currency_ID=c.C_Curre...
Fill Picks with values
public boolean isEmpty(){ return size() == 0; }
Returns <tt>true</tt> if this list contains no elements.
public ThreadSafeClientConnManager(HttpParams params,SchemeRegistry schreg){ if (params == null) { throw new IllegalArgumentException("HTTP parameters may not be null"); } this.schemeRegistry=schreg; this.connOperator=createConnectionOperator(schreg); this.connectionPool=createConnectionPool(params); }
Creates a new thread safe connection manager.
public static PointerIcon createCustomIcon(Bitmap bitmap,float hotSpotX,float hotSpotY){ if (bitmap == null) { throw new IllegalArgumentException("bitmap must not be null"); } validateHotSpot(bitmap,hotSpotX,hotSpotY); PointerIcon icon=new PointerIcon(STYLE_CUSTOM); icon.mBitmap=bitmap; icon.mHotSpotX=h...
Creates a custom pointer from the given bitmap and hotspot information.
private int updateSeq(int seq){ long udelta=seq - maxSeq; if (probation > 0) { if (seq == maxSeq + 1) { probation--; maxSeq=seq; if (probation == 0) { initSeq(seq); received++; return 1; } } else { probation=MIN_SEQUENCIAL - 1; maxSeq=seq; r...
Ensures that a source is declared valid only after MIN_SEQUENTIAL packets have been received in sequence.It also validates the sequence number seq of a newly received packet and updates the sequence state. Algorithm in the RFC 3550 (Appendix A.1)
public void suspendEncoding() throws java.io.IOException { flushBase64(); this.suspendEncoding=true; }
Suspends encoding of the stream. May be helpful if you need to embed a piece of base64-encoded data in a stream.
public PacketOutputStream(OutputStream outputStream,boolean logQuery,int maxQuerySizeToLog){ this.outputStream=outputStream; buffer=firstBuffer=ByteBuffer.allocate(BUFFER_DEFAULT_SIZE).order(ByteOrder.LITTLE_ENDIAN); useCompression=false; buffer.position(4); this.logQuery=logQuery; this.maxQuerySizeToLog=ma...
Initialization with server outputStream.
public String toString(){ String prefix=Functions.getAttributeName(type) + " = "; if (type == CKA_CLASS) { return prefix + Functions.getObjectClassName(getLong()); } else if (type == CKA_KEY_TYPE) { return prefix + Functions.getKeyName(getLong()); } else { String s; if (pValue instanceof cha...
Returns the string representation of CK_ATTRIBUTE.