public virtual bool checkRootLabelCodes(LabelSet rlc) { if (rlc == null && rootLabelCodes == null) { return true; // or false ? } else if ((rlc == null && rootLabelCodes != null) || (rlc != null && rootLabelCodes == null)) { return false; } else if (rlc.size() != rootLabelCodes.size()) { return false; } else { foreach (SymbolTable table in rootLabelCodes.Keys) { if (!rootLabelCodes.get(table).Equals(rlc.get(table))) { return false; } } return true; } }
/// <summary> /// Returns the number of labels of the graph element. /// </summary> /// <returns> the number of labels of the graph element. </returns> public virtual int nLabels() { if (labelSet == null) { return(0); } return(labelSet.size()); }