@Override public void setValue(Object value) { setDateValue((Date) value); }
return equals((CK_DATE) this.ckAttribute.pValue, (CK_DATE) other.ckAttribute.pValue);
/** * The overriding of this method should ensure that the objects of this * class work correctly in a hashtable. * * @return The hash code of this object. * @preconditions * @postconditions */ @Override public int hashCode() { if ((ckAttribute.pValue == null)) { return (int) ckAttribute.type; } return ((int) ckAttribute.type) ^ hashCode((CK_DATE) ckAttribute.pValue); }
/** * Allocates the attribute objects for this class and adds them to the * attribute table. * * @preconditions * @postconditions */ @Override protected void allocateAttributes() { super.allocateAttributes(); certificateType = new CertificateTypeAttribute(); trusted = new BooleanAttribute(Attribute.TRUSTED); certificateCategory = new LongAttribute(Attribute.CERTIFICATE_CATEGORY); checkValue = new ByteArrayAttribute(Attribute.CHECK_VALUE); startDate = new DateAttribute(Attribute.START_DATE); endDate = new DateAttribute(Attribute.END_DATE); putAttributesInTable(this); }
/** * Allocates the attribute objects for this class and adds them to the * attribute table. * * @preconditions * @postconditions */ @Override protected void allocateAttributes() { super.allocateAttributes(); keyType = new KeyTypeAttribute(); id = new ByteArrayAttribute(Attribute.ID); startDate = new DateAttribute(Attribute.START_DATE); endDate = new DateAttribute(Attribute.END_DATE); derive = new BooleanAttribute(Attribute.DERIVE); local = new BooleanAttribute(Attribute.LOCAL); keyGenMechanism = new MechanismAttribute(Attribute.KEY_GEN_MECHANISM); allowedMechanisms = new MechanismArrayAttribute( Attribute.ALLOWED_MECHANISMS); putAttributesInTable(this); }
newCertTemp.getStartDate().setDateValue(cert.getCert().getNotBefore()); newCertTemp.getStartDate().setDateValue(cert.getCert().getNotAfter());
/** * Compares all member variables of this object with the other object. * Returns only true, if all are equal in both objects. * * @param otherObject * The other object to compare to. * @return True, if other is an instance of this class and all member * variables of both objects are equal. False, otherwise. * @preconditions * @postconditions */ @Override public boolean equals(Object otherObject) { if (this == otherObject) { return true; } else if (!(otherObject instanceof Certificate)) { return false; } Certificate other = (Certificate) otherObject; return super.equals(other) && this.certificateType.equals(other.certificateType) && this.trusted.equals(other.trusted) && this.certificateCategory.equals(other.certificateCategory) && this.checkValue.equals(other.checkValue) && this.startDate.equals(other.startDate) && this.endDate.equals(other.endDate); }
/** * Compares all member variables of this object with the other object. * Returns only true, if all are equal in both objects. * * @param otherObject * The other object to compare to. * @return True, if other is an instance of this class and all member * variables of both objects are equal. False, otherwise. * @preconditions * @postconditions */ @Override public boolean equals(Object otherObject) { if (this == otherObject) { return true; } else if (!(otherObject instanceof Key)) { return false; } Key other = (Key) otherObject; return super.equals(other) && this.keyType.equals(other.keyType) && this.id.equals(other.id) && this.startDate.equals(other.startDate) && this.endDate.equals(other.endDate) && this.derive.equals(other.derive) && this.local.equals(other.local) && this.keyGenMechanism.equals(other.keyGenMechanism) && this.allowedMechanisms.equals(other.allowedMechanisms); }