/** * Returns the attribute values for the supplied oid. * * @param oid to match * * @return attribute values */ public AttributeValueAssertion.Value[] getAttributeValues(final String oid) { final List<AttributeValueAssertion.Value> values = new ArrayList<>(); for (AttributeValueAssertion type : attributeValueAssertions) { if (type.getOid().equals(oid)) { values.add(type.getValue()); } } return values.toArray(new AttributeValueAssertion.Value[values.size()]); }
/** * Returns the attribute values for the supplied oid. * * @param oid to match * * @return attribute values */ public AttributeValueAssertion.Value[] getAttributeValues(final String oid) { final List<AttributeValueAssertion.Value> values = new ArrayList<>(); for (AttributeValueAssertion type : attributeValueAssertions) { if (type.getOid().equals(oid)) { values.add(type.getValue()); } } return values.toArray(new AttributeValueAssertion.Value[values.size()]); }
/** * Returns the attribute values for the supplied oid. * * @param oid to match * * @return attribute values */ public AttributeValueAssertion.Value[] getAttributeValues(final String oid) { final List<AttributeValueAssertion.Value> values = new ArrayList<>(); for (AttributeValueAssertion type : attributeValueAssertions) { if (type.getOid().equals(oid)) { values.add(type.getValue()); } } return values.toArray(new AttributeValueAssertion.Value[values.size()]); }
/** * Returns the attribute values decoded by the supplied transcoder. * * @param <T> type of value * @param oid to match * @param transcoder to decode the binary value * * @return decoded attribute values */ @SuppressWarnings("unchecked") public <T> T[] getAttributeValues(final String oid, final ValueTranscoder<T> transcoder) { final List<T> values = new ArrayList<>(); for (AttributeValueAssertion type : attributeValueAssertions) { if (type.getOid().equals(oid)) { values.add(transcoder.decodeBinaryValue(type.getValue().getBytes())); } } return (T[]) values.toArray(); }
/** * Returns the attribute values decoded by the supplied transcoder. * * @param <T> type of value * @param oid to match * @param transcoder to decode the binary value * * @return decoded attribute values */ @SuppressWarnings("unchecked") public <T> T[] getAttributeValues(final String oid, final ValueTranscoder<T> transcoder) { final List<T> values = new ArrayList<>(); for (AttributeValueAssertion type : attributeValueAssertions) { if (type.getOid().equals(oid)) { values.add(transcoder.decodeBinaryValue(type.getValue().getBytes())); } } return (T[]) values.toArray(); }
/** * Returns the attribute values decoded by the supplied transcoder. * * @param <T> type of value * @param oid to match * @param transcoder to decode the binary value * * @return decoded attribute values */ @SuppressWarnings("unchecked") public <T> T[] getAttributeValues(final String oid, final ValueTranscoder<T> transcoder) { final List<T> values = new ArrayList<>(); for (AttributeValueAssertion type : attributeValueAssertions) { if (type.getOid().equals(oid)) { values.add(transcoder.decodeBinaryValue(type.getValue().getBytes())); } } return (T[]) values.toArray(); }