本文整理汇总了Java中net.meisen.general.genmisc.types.Objects.equals方法的典型用法代码示例。如果您正苦于以下问题:Java Objects.equals方法的具体用法?Java Objects.equals怎么用?Java Objects.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.meisen.general.genmisc.types.Objects
的用法示例。
在下文中一共展示了Objects.equals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object o) {
boolean cmp = false;
if (o == this) {
cmp = true;
} else if (o == null) {
// nothing to do
} else if (getClass().equals(o.getClass())) {
@SuppressWarnings("unchecked")
final T d = (T) o;
// check the values
if (valueEquals(d) && Objects.equals(getModel(), d.getModel())) {
cmp = true;
}
}
return cmp;
}
示例2: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object o) {
if (o == null) {
return false;
} else if (o == this) {
return true;
} else if (o instanceof TimelineDefinition) {
final TimelineDefinition cmp = (TimelineDefinition) o;
return Objects.equals(cmp.type, type)
&& Objects.equals(cmp.granularity, granularity)
&& Objects.equals(cmp.start, start)
&& Objects.equals(cmp.end, end);
} else {
return false;
}
}
示例3: removePrefix
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
/**
* Creates a sub-group of {@code this} by removing the {@code prefix}.
*
* @param prefix
* the prefix to be removed
*
* @return the sub-group, or {@code null} if the prefix is not an actual
* prefix
*/
public Group removePrefix(final Group prefix) {
// if the prefix is longer it cannot be a prefix for sure
if (prefix.size() > size() || isEmpty()) {
return null;
}
// validate
for (int i = 0; i < prefix.size(); i++) {
final String prefixValue = prefix.getPart(i);
if (!Objects.equals(prefixValue, getPart(i))) {
return null;
}
}
return new Group(Arrays.copyOfRange(items, prefix.size(), size()));
}
示例4: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
} else if (obj == null) {
return false;
} else if (obj instanceof DescriptorDimension) {
final DescriptorDimension cmpDim = (DescriptorDimension) obj;
return Objects.equals(getDescriptorModelId(),
cmpDim.getDescriptorModelId())
&& Objects.equals(getId(), cmpDim.getId());
} else {
return false;
}
}
示例5: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
} else if (obj == null) {
return false;
} else if (obj instanceof DescriptorMember) {
final DescriptorMember cmpMember = (DescriptorMember) obj;
return Objects.equals(id, cmpMember.getId())
&& Objects.equals(getHierachy(), cmpMember.getHierachy());
} else {
return false;
}
}
示例6: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object o) {
if (super.equals(o)) {
final MetaStructureEntry e = (MetaStructureEntry) o;
return Objects.equals(getDescriptorModel(), e.getDescriptorModel());
} else {
return false;
}
}
示例7: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
} else if (obj == null) {
return false;
} else if (obj instanceof DescriptorLevel) {
final DescriptorLevel cmpLevel = (DescriptorLevel) obj;
return Objects.equals(id, cmpLevel.getId())
&& Objects.equals(getHierachy(), cmpLevel.getHierachy());
} else {
return false;
}
}
示例8: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
} else if (obj == null) {
return false;
} else if (obj instanceof TimeLevelMember) {
final TimeLevelMember tmr = (TimeLevelMember) obj;
return Objects.equals(tmr.getId(), getId())
&& Objects.equals(tmr.getRanges(), getRanges());
} else {
return false;
}
}
示例9: contains
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
/**
* Checks if the specified {@code metaData} contains an information with the
* specified {@code id} and {@code value}.
*
* @param metaData
* the meta-data to look into
* @param id
* the identifier to search for
* @param value
* the value to search for
*
* @return (@code true) if the {@code MetaData} contains the specified
* entry, otherwise (@code false)
*/
protected boolean contains(final LoadedMetaData metaData, final Object id,
final Object value) {
if (metaData == null) {
return false;
}
final Map<Object, Object> curValues = metaData.getIdentifiedValues();
if (curValues.containsKey(id)) {
final Object curValue = curValues.get(id);
return Objects.equals(curValue, value);
} else {
return false;
}
}
示例10: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object object) {
if (!(object instanceof ResourceInfo)) {
return false;
} else {
final ResourceInfo resInfo = (ResourceInfo) object;
return Objects.equals(resInfo.type, type)
&& Objects.equals(resInfo.inJarPath, inJarPath)
&& Objects.equals(resInfo.jarPath, jarPath)
&& Objects.equals(resInfo.fullPath, fullPath);
}
}
示例11: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (o == null) {
return false;
} else if (getClass().equals(o.getClass())) {
final StructureEntry e = (StructureEntry) o;
return getPosition() == e.getPosition()
&& Objects.equals(getName(), e.getName());
} else {
return false;
}
}
示例12: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object o) {
if (super.equals(o)) {
final IntervalStructureEntry e = (IntervalStructureEntry) o;
return Objects.equals(getIntervalType(), e.getIntervalType());
} else {
return false;
}
}
示例13: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
} else if (obj instanceof FactDescriptor) {
final FactDescriptor<?> fd = (FactDescriptor<?>) obj;
return hashCode() == fd.hashCode()
&& Objects.equals(fd.getId(), getId())
&& Objects.equals(fd.getModelId(), getModelId());
} else {
return false;
}
}
示例14: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
} else if (obj instanceof DirectlyDefinedMetaData) {
final DirectlyDefinedMetaData ddmd = (DirectlyDefinedMetaData) obj;
return Objects.equals(ddmd.descriptorModelId, descriptorModelId)
&& Objects.equals(ddmd.values, values);
} else {
return false;
}
}
示例15: equals
import net.meisen.general.genmisc.types.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (o instanceof Identifier) {
final Identifier i = (Identifier) o;
return Objects.equals(i.id, id) && i.group.equals(group);
} else {
return false;
}
}