/** * Returns all the pointer targets of this synset. * * @return all the pointer targets of this synset * @throws JWNLException JWNLException */ public List<PointerTarget> getTargets() throws JWNLException { return collectTargets(getPointers()); }
/** * Returns all the targets of the pointers of type <var>type</var>. * * @param type pointer type * @return all the targets of the pointers of type <var>type</var> * @throws JWNLException JWNLException */ public List<PointerTarget> getTargets(PointerType type) throws JWNLException { return collectTargets(getPointers(type)); }
/** * Returns all the targets of the pointers of type <var>type</var>. * * @param type pointer type * @return all the targets of the pointers of type <var>type</var> * @throws JWNLException JWNLException */ public List<PointerTarget> getTargets(PointerType type) throws JWNLException { return collectTargets(getPointers(type)); }
/** * Returns all the pointer targets of this synset. * * @return all the pointer targets of this synset * @throws JWNLException JWNLException */ public List<PointerTarget> getTargets() throws JWNLException { return collectTargets(getPointers()); }
/** * Returns all pointers of type <var>type</var>. * * @param type pointer type * @return all pointers of type <var>type</var> */ public List<Pointer> getPointers(PointerType type) { List<Pointer> result = new ArrayList<>(); for (Pointer pointer : getPointers()) { if (pointer.getType().equals(type) || PointerType.HYPERNYM == type && PointerType.INSTANCE_HYPERNYM == pointer.getType() || PointerType.HYPONYM == type && PointerType.INSTANCES_HYPONYM == pointer.getType()) { result.add(pointer); } } return result; }
/** * Returns all pointers of type <var>type</var>. * * @param type pointer type * @return all pointers of type <var>type</var> */ public List<Pointer> getPointers(PointerType type) { List<Pointer> result = new ArrayList<>(); for (Pointer pointer : getPointers()) { if (pointer.getType().equals(type) || PointerType.HYPERNYM == type && PointerType.INSTANCE_HYPERNYM == pointer.getType() || PointerType.HYPONYM == type && PointerType.INSTANCES_HYPONYM == pointer.getType()) { result.add(pointer); } } return result; }