Example #1
0
 @Override
 public boolean equals(final Object other) {
   if (this == other) return true;
   if (!(other instanceof JsonApiObject)) return false;
   JsonApiObject castOther = (JsonApiObject) other;
   return Objects.equal(version, castOther.version) && Objects.equal(meta, castOther.meta);
 }
  /** 检查营业执照修改情况 */
  private void checkBusinessLicense(
      Map<String, String> changedInfo, PaperworkDto updatedPaperwork, PaperworkDto oldPaperwork) {

    if (!Objects.equal(updatedPaperwork.getBusinessLicense(), oldPaperwork.getBusinessLicense())) {
      changedInfo.put(
          ChangedInfoKeys.companyBusinessLicense(), updatedPaperwork.getBusinessLicense());
    }
    if (!Objects.equal(
        updatedPaperwork.getBusinessLicenseId(), oldPaperwork.getBusinessLicenseId())) {
      changedInfo.put(
          ChangedInfoKeys.companyBusinessLicenseId(), updatedPaperwork.getBusinessLicenseId());
    }

    DateTime updatedBlDate = new DateTime(updatedPaperwork.getBlDate());
    if (oldPaperwork.getBlDate() == null) {
      changedInfo.put(
          ChangedInfoKeys.companyBusinessLicenseDate(), updatedBlDate.toString(FORMATTER));
    } else {
      DateTime oldBlDate = new DateTime(oldPaperwork.getBlDate());
      if (!updatedBlDate.isEqual(oldBlDate)) {
        changedInfo.put(
            ChangedInfoKeys.companyBusinessLicenseDate(), updatedBlDate.toString(FORMATTER));
      }
    }
  }
 public void assertNonSmoking(final CharSequence input) throws Exception {
   final String string = input.toString();
   final List<CommonToken> tokenList = CollectionLiterals.<CommonToken>newArrayList();
   {
     final Lexer lexer = this.lexerProvider.get();
     ANTLRStringStream _aNTLRStringStream = new ANTLRStringStream(string);
     lexer.setCharStream(_aNTLRStringStream);
     Token token = lexer.nextToken();
     boolean _notEquals = (!Objects.equal(token, Token.EOF_TOKEN));
     boolean _while = _notEquals;
     while (_while) {
       {
         tokenList.add(((CommonToken) token));
         Token _nextToken = lexer.nextToken();
         token = _nextToken;
       }
       boolean _notEquals_1 = (!Objects.equal(token, Token.EOF_TOKEN));
       _while = _notEquals_1;
     }
   }
   for (final CommonToken token : tokenList) {
     {
       final int start = token.getStartIndex();
       String _text = token.getText();
       final int length = _text.length();
       String _substring = string.substring(0, start);
       String _substring_1 = string.substring((start + length));
       String _plus = (_substring + _substring_1);
       this.processFile(_plus);
     }
   }
 }
Example #4
0
    @Override
    public Server deserialize(
        JsonElement jsonElement, Type type, JsonDeserializationContext context)
        throws JsonParseException {
      Server serverBase;

      // Servers can be created without an image so test if an image object is returned
      if (jsonElement.getAsJsonObject().get("image").isJsonObject()) {
        serverBase = apply((ServerInternal) context.deserialize(jsonElement, ServerInternal.class));
      } else {
        serverBase =
            apply(
                (ServerInternalWithoutImage)
                    context.deserialize(jsonElement, ServerInternalWithoutImage.class));
      }

      Server.Builder<?> result = Server.builder().fromServer(serverBase);
      ServerExtendedStatus extendedStatus =
          context.deserialize(jsonElement, ServerExtendedStatus.class);
      if (!Objects.equal(extendedStatus, ServerExtendedStatus.builder().build())) {
        result.extendedStatus(extendedStatus);
      }
      ServerExtendedAttributes extraAttributes =
          context.deserialize(jsonElement, ServerExtendedAttributes.class);
      if (!Objects.equal(extraAttributes, ServerExtendedAttributes.builder().build())) {
        result.extendedAttributes(extraAttributes);
      }
      return result.build();
    }
 public boolean equals(Object other) {
   if (other instanceof GetVolumeDBRangeResult) {
     GetVolumeDBRangeResult obj = (GetVolumeDBRangeResult) other;
     return Objects.equal(_minValue, obj._minValue) && Objects.equal(_maxValue, obj._maxValue);
   }
   return false;
 }
 /**
  * Overridden to control if the passed object equals the current one.
  *
  * @see java.lang.Object#equals(Object)
  */
 public boolean equals(Object obj) {
   if (obj == null) return false;
   return Objects.equal(((SecurityContext) obj).getGroupID(), this.getGroupID())
       && Objects.equal(
           ((SecurityContext) obj).getServerInformation(), this.getServerInformation())
       && Objects.equal(((SecurityContext) obj).getExperimenter(), this.getExperimenter());
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null || getClass() != obj.getClass()) return false;
   ContainerCDNMetadata that = ContainerCDNMetadata.class.cast(obj);
   return Objects.equal(this.name, that.name) && Objects.equal(this.CDNUri, that.CDNUri);
 }
Example #8
0
 protected static String _privk3_getContextPath(
     final RegionAspectRegionAspectProperties _self_,
     final Region _self,
     final AbstractState _vertex) {
   String root = "currentState";
   ArrayList<Region> parentRegions = new ArrayList<Region>();
   Region currentRegion = _vertex.getOwnerRegion();
   while ((!Objects.equal(currentRegion, null))) {
     {
       parentRegions.add(currentRegion);
       State _ownerState = currentRegion.getOwnerState();
       boolean _notEquals = (!Objects.equal(_ownerState, null));
       if (_notEquals) {
         State _ownerState_1 = currentRegion.getOwnerState();
         Region _ownerRegion = _ownerState_1.getOwnerRegion();
         currentRegion = _ownerRegion;
       } else {
         currentRegion = null;
       }
     }
   }
   for (int i = (parentRegions.size() - 1); (i >= 0); i--) {
     String _root = root;
     Region _get = parentRegions.get(i);
     String _name = _get.getName();
     String _plus = ("-" + _name);
     root = (_root + _plus);
   }
   return root;
 }
Example #9
0
 @Override
 public final boolean equals(Object o) {
   if (!(o instanceof Pair)) return false;
   Pair that = (Pair) o;
   // handles nulls properly
   return Objects.equal(left, that.left) && Objects.equal(right, that.right);
 }
Example #10
0
 public EList<Member> mergeMembers(final ComplexTypeLiteral a, final ComplexTypeLiteral b) {
   HashMap<String, Member> members = new HashMap<String, Member>();
   boolean _notEquals = (!Objects.equal(a, null));
   if (_notEquals) {
     EList<Member> _members = a.getMembers();
     for (final Member m : _members) {
       String _name = m.getName();
       members.put(_name, m);
     }
   }
   boolean _notEquals_1 = (!Objects.equal(b, null));
   if (_notEquals_1) {
     EList<Member> _members_1 = b.getMembers();
     for (final Member m_1 : _members_1) {
       String _name_1 = m_1.getName();
       boolean _containsKey = members.containsKey(_name_1);
       boolean _not = (!_containsKey);
       if (_not) {
         String _name_2 = m_1.getName();
         members.put(_name_2, m_1);
       }
     }
   }
   Collection<Member> _values = members.values();
   return new BasicEList<Member>(_values);
 }
  @Override
  public IInternalPapyrusRepository getRepositoryForURI(URI uri, boolean connectedOnly) {
    IInternalPapyrusRepository result = null;

    if (CDOUtils.isCDOURI(uri)) {
      String uuid = CDOURIUtil.extractRepositoryUUID(uri);

      for (IInternalPapyrusRepository next : repositories.values()) {
        CDOSession session = next.getCDOSession();
        if ((session != null) && Objects.equal(uuid, session.getRepositoryInfo().getUUID())) {
          result = next;
          break;
        }
      }

      if ((result == null) && !connectedOnly) {
        // guess based on the last known UUIDs
        for (IInternalPapyrusRepository next : repositories.values()) {
          PapyrusRepository repo = CDOUtils.tryCast(next, PapyrusRepository.class);
          if ((repo != null) && Objects.equal(uuid, repo.getModel().getUUID())) {
            result = next;
            break;
          }
        }
      }
    }

    return result;
  }
 protected boolean hasIdRule(final CrossReference crossRef) {
   AbstractElement _terminal = crossRef.getTerminal();
   if ((_terminal instanceof RuleCall)) {
     AbstractElement _terminal_1 = crossRef.getTerminal();
     AbstractRule _rule = ((RuleCall) _terminal_1).getRule();
     final String ruleName = _rule.getName();
     boolean _or = false;
     boolean _or_1 = false;
     boolean _equals = Objects.equal(ruleName, "IdOrSuper");
     if (_equals) {
       _or_1 = true;
     } else {
       boolean _equals_1 = Objects.equal(ruleName, "ValidID");
       _or_1 = _equals_1;
     }
     if (_or_1) {
       _or = true;
     } else {
       boolean _equals_2 = Objects.equal(ruleName, "FeatureCallID");
       _or = _equals_2;
     }
     return _or;
   }
   return false;
 }
 public boolean isConformant(final SJClass c1, final SJClass c2) {
   boolean _or = false;
   boolean _or_1 = false;
   boolean _or_2 = false;
   boolean _or_3 = false;
   boolean _equals = Objects.equal(c1, SmallJavaTypeProvider.nullType);
   if (_equals) {
     _or_3 = true;
   } else {
     boolean _conformToLibraryTypes = this.conformToLibraryTypes(c1, c2);
     _or_3 = _conformToLibraryTypes;
   }
   if (_or_3) {
     _or_2 = true;
   } else {
     boolean _equals_1 = Objects.equal(c1, c2);
     _or_2 = _equals_1;
   }
   if (_or_2) {
     _or_1 = true;
   } else {
     QualifiedName _fullyQualifiedName = this._iQualifiedNameProvider.getFullyQualifiedName(c2);
     String _string = _fullyQualifiedName.toString();
     boolean _equals_2 = Objects.equal(_string, SmallJavaLib.LIB_OBJECT);
     _or_1 = _equals_2;
   }
   if (_or_1) {
     _or = true;
   } else {
     boolean _isSubclassOf = this.isSubclassOf(c1, c2);
     _or = _isSubclassOf;
   }
   return _or;
 }
Example #14
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null || getClass() != obj.getClass()) return false;
   Address that = Address.class.cast(obj);
   return Objects.equal(this.addr, that.addr) && Objects.equal(this.version, that.version);
 }
Example #15
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null || getClass() != obj.getClass()) return false;
   EmailQuota that = EmailQuota.class.cast(obj);
   return Objects.equal(this.max, that.max) && Objects.equal(this.unit, that.unit);
 }
Example #16
0
 protected static String _privk3_getContextPathByRegion(
     final RegionAspectRegionAspectProperties _self_, final Region _self) {
   String root = "currentState";
   ArrayList<Region> parentRegions = new ArrayList<Region>();
   Region currentRegion = _self;
   while (((!Objects.equal(currentRegion.getOwnerState(), null))
       && (!Objects.equal(currentRegion.getOwnerState().getOwnerRegion(), null)))) {
     {
       State _ownerState = _self.getOwnerState();
       Region _ownerRegion = _ownerState.getOwnerRegion();
       parentRegions.add(_ownerRegion);
       State _ownerState_1 = currentRegion.getOwnerState();
       Region _ownerRegion_1 = _ownerState_1.getOwnerRegion();
       currentRegion = _ownerRegion_1;
     }
   }
   for (int i = (parentRegions.size() - 1); (i >= 0); i--) {
     String _root = root;
     Region _get = parentRegions.get(i);
     String _name = _get.getName();
     String _plus = ("-" + _name);
     root = (_root + _plus);
   }
   String _name = _self.getName();
   return ((root + "-") + _name);
 }
 /** 是否需要检查信息是否修改了 */
 public boolean needCheckChanged(Integer approveStatus) {
   if (Objects.equal(approveStatus, User.ApproveStatus.ENTER_WAITING_FOR_APPROVE.value())
       || Objects.equal(approveStatus, User.ApproveStatus.INIT.value())) {
     return false;
   }
   return true;
 }
Example #18
0
 @Override
 public boolean equals(Object o) {
   if (this == o) return true;
   if (o == null || getClass() != o.getClass()) return false;
   News news = (News) o;
   return Objects.equal(id, news.id) && Objects.equal(uri, news.uri);
 }
 @Override
 public String getDisplayString(
     final EObject element, final String givenQualifiedNameAsString, final String shortName) {
   String qualifiedNameAsString = givenQualifiedNameAsString;
   boolean _equals = Objects.equal(qualifiedNameAsString, null);
   if (_equals) {
     qualifiedNameAsString = shortName;
   }
   boolean _equals_1 = Objects.equal(qualifiedNameAsString, null);
   if (_equals_1) {
     boolean _notEquals = (!Objects.equal(element, null));
     if (_notEquals) {
       ILabelProvider _labelProvider = this.getLabelProvider();
       String _text = _labelProvider.getText(element);
       qualifiedNameAsString = _text;
     } else {
       return null;
     }
   }
   if ((!(element instanceof MobaApplication))) {
     IQualifiedNameConverter _qualifiedNameConverter = this.getQualifiedNameConverter();
     final QualifiedName qualifiedName =
         _qualifiedNameConverter.toQualifiedName(qualifiedNameAsString);
     int _segmentCount = qualifiedName.getSegmentCount();
     boolean _greaterThan = (_segmentCount > 1);
     if (_greaterThan) {
       String _lastSegment = qualifiedName.getLastSegment();
       String _plus = (_lastSegment + " - ");
       return (_plus + qualifiedNameAsString);
     }
   }
   return qualifiedNameAsString;
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null || getClass() != obj.getClass()) return false;
   AllocationPool that = AllocationPool.class.cast(obj);
   return Objects.equal(this.start, that.start) && Objects.equal(this.end, that.end);
 }
Example #21
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null || getClass() != obj.getClass()) return false;
   Subject other = (Subject) obj;
   return Objects.equal(principal, other.principal) && Objects.equal(type, other.type);
 }
 public <T extends Object, U extends Object> Iterable<T> select(
     final AbstractNodeMappingCall<T, U> nodeMappingCall, final U domainArgument) {
   boolean _equals = Objects.equal(domainArgument, null);
   if (_equals) {
     return Collections.<T>unmodifiableList(CollectionLiterals.<T>newArrayList());
   }
   if ((nodeMappingCall instanceof NodeMappingCall<?, ?>)) {
     final NodeMappingCall<T, U> nodeMappingCallCasted = ((NodeMappingCall<T, U>) nodeMappingCall);
     Function1<? super U, ? extends T> _selector = nodeMappingCallCasted.getSelector();
     final T nodeObject =
         ((Function1<? super Object, ? extends T>)
                 ((Function1<? super Object, ? extends T>) _selector))
             .apply(domainArgument);
     boolean _equals_1 = Objects.equal(nodeObject, null);
     if (_equals_1) {
       return Collections.<T>unmodifiableList(CollectionLiterals.<T>newArrayList());
     } else {
       return Collections.<T>unmodifiableList(CollectionLiterals.<T>newArrayList(nodeObject));
     }
   } else {
     if ((nodeMappingCall instanceof MultiNodeMappingCall<?, ?>)) {
       final MultiNodeMappingCall<T, U> nodeMappingCallCasted_1 =
           ((MultiNodeMappingCall<T, U>) nodeMappingCall);
       Function1<? super U, ? extends Iterable<? extends T>> _selector_1 =
           nodeMappingCallCasted_1.getSelector();
       Iterable<T> _apply =
           ((Function1<? super Object, ? extends Iterable<T>>)
                   ((Function1<? super Object, ? extends Iterable<T>>) _selector_1))
               .apply(domainArgument);
       return IterableExtensions.<T>filterNull(_apply);
     }
   }
   return null;
 }
 public <T extends Object> XConnection createConnection(
     final T connectionObject,
     final ConnectionMapping<T> connectionMapping,
     final Procedure1<? super XConnection> initializer,
     final InterpreterContext context) {
   boolean _isApplicable = connectionMapping.isApplicable(connectionObject);
   if (_isApplicable) {
     final ConnectionMapping<T> connectionMappingCasted =
         ((ConnectionMapping<T>) connectionMapping);
     final IMappedElementDescriptor<T> descriptor =
         this.<T>getDescriptor(connectionObject, connectionMappingCasted);
     boolean _equals = Objects.equal(descriptor, null);
     if (_equals) {
       return null;
     }
     final XConnection existingConnection = context.getConnection(descriptor);
     boolean _or = false;
     boolean _notEquals = (!Objects.equal(existingConnection, null));
     if (_notEquals) {
       _or = true;
     } else {
       boolean _isCreateConnections = context.isCreateConnections();
       boolean _not = (!_isCreateConnections);
       _or = _not;
     }
     if (_or) {
       return existingConnection;
     }
     final XConnection connection = connectionMappingCasted.createConnection(descriptor);
     XDiagramConfig _config = connectionMappingCasted.getConfig();
     _config.initialize(connection);
     List<AbstractLabelMappingCall<?, T>> _labels = connectionMapping.getLabels();
     final Consumer<AbstractLabelMappingCall<?, T>> _function =
         (AbstractLabelMappingCall<?, T> it) -> {
           ObservableList<XConnectionLabel> _labels_1 = connection.getLabels();
           Iterable<? extends XLabel> _execute = this.execute(it, connectionObject);
           Iterable<XConnectionLabel> _filter =
               Iterables.<XConnectionLabel>filter(_execute, XConnectionLabel.class);
           Iterables.<XConnectionLabel>addAll(_labels_1, _filter);
         };
     _labels.forEach(_function);
     initializer.apply(connection);
     this.<T>createEndpoints(connectionMapping, connectionObject, connection, context);
     boolean _and = false;
     XNode _source = connection.getSource();
     boolean _notEquals_1 = (!Objects.equal(_source, null));
     if (!_notEquals_1) {
       _and = false;
     } else {
       XNode _target = connection.getTarget();
       boolean _notEquals_2 = (!Objects.equal(_target, null));
       _and = _notEquals_2;
     }
     if (_and) {
       context.addConnection(connection);
       return connection;
     }
   }
   return null;
 }
 public boolean equals(Object other) {
   if (other instanceof CreateObjectResult) {
     CreateObjectResult obj = (CreateObjectResult) other;
     return Objects.equal(_objectID, obj._objectID) && Objects.equal(_result, obj._result);
   }
   return false;
 }
Example #25
0
 @Override
 public boolean equals(Object obj) {
   if (!(obj instanceof KeyStore)) return false;
   KeyStore other = (KeyStore) obj;
   return super.equals(obj)
       && Objects.equal(keyPassword, other.keyPassword)
       && Objects.equal(keyAlias, other.keyAlias);
 }
 @Override
 public boolean equals(Object object) {
   if (object instanceof CoordinatorGroup) {
     CoordinatorGroup other = (CoordinatorGroup) object;
     return Objects.equal(degreeType, other.degreeType) && Objects.equal(degree, other.degree);
   }
   return false;
 }
Example #27
0
 @Override
 public boolean equals(Object obj) {
   if (obj instanceof MetricsInfo) {
     MetricsInfo other = (MetricsInfo) obj;
     return Objects.equal(name, other.name()) && Objects.equal(description, other.description());
   }
   return false;
 }
Example #28
0
 @Override
 public boolean equals(Object obj) {
   if (obj instanceof LibraryImport) {
     LibraryImport other = (LibraryImport) obj;
     return Objects.equal(prefix, other.prefix) && Objects.equal(library, other.library);
   }
   return false;
 }
Example #29
0
 @Override
 public boolean equals(Object obj) {
   if (obj instanceof Dependency) {
     Dependency dep = (Dependency) obj;
     return Objects.equal(libUri, dep.libUri) && Objects.equal(unitName, dep.unitName);
   }
   return false;
 }
Example #30
0
 @Override
 public boolean equals(Object other) {
   if (!(other instanceof SshPollIdentifier)) {
     return false;
   }
   SshPollIdentifier o = (SshPollIdentifier) other;
   return Objects.equal(command, o.command) && Objects.equal(env, o.env);
 }