Refine search
public Marker getDetachedMarker(String name) { return new BasicMarker(name); }
public void add(Marker reference) { if (reference == null) { throw new IllegalArgumentException("A null value cannot be added to a Marker as reference."); } // no point in adding the reference multiple times if (this.contains(reference)) { return; } else if (reference.contains(this)) { // avoid recursion // a potential reference should not hold its future "parent" as a reference return; } else { referenceList.add(reference); } }
public boolean contains(Marker other) { if (other == null) { throw new IllegalArgumentException("Other cannot be null"); } if (this.equals(other)) { return true; } if (hasReferences()) { for (Marker ref : referenceList) { if (ref.contains(other)) { return true; } } } return false; }
public String toString() { if (!this.hasReferences()) { return this.getName(); } Iterator<Marker> it = this.iterator(); Marker reference; StringBuilder sb = new StringBuilder(this.getName()); sb.append(' ').append(OPEN); while (it.hasNext()) { reference = it.next(); sb.append(reference.getName()); if (it.hasNext()) { sb.append(SEP); } } sb.append(CLOSE); return sb.toString(); } }
/** * This method is mainly used with Expression Evaluators. */ public boolean contains(String name) { if (name == null) { throw new IllegalArgumentException("Other cannot be null"); } if (this.name.equals(name)) { return true; } if (hasReferences()) { for (Marker ref : referenceList) { if (ref.contains(name)) { return true; } } } return false; }
public boolean hasChildren() { return hasReferences(); }
public String toString() { if (!this.hasReferences()) { return this.getName(); } Iterator<Marker> it = this.iterator(); Marker reference; StringBuilder sb = new StringBuilder(this.getName()); sb.append(' ').append(OPEN); while (it.hasNext()) { reference = it.next(); sb.append(reference.getName()); if (it.hasNext()) { sb.append(SEP); } } sb.append(CLOSE); return sb.toString(); } }
/** * This method is mainly used with Expression Evaluators. */ public boolean contains(String name) { if (name == null) { throw new IllegalArgumentException("Other cannot be null"); } if (this.name.equals(name)) { return true; } if (hasReferences()) { for (Marker ref : referenceList) { if (ref.contains(name)) { return true; } } } return false; }
public boolean hasChildren() { return hasReferences(); }
public String toString() { if (!this.hasReferences()) { return this.getName(); } Iterator it = this.iterator(); Marker reference; StringBuffer sb = new StringBuffer(this.getName()); sb.append(' ').append(OPEN); while (it.hasNext()) { reference = (Marker) it.next(); sb.append(reference.getName()); if (it.hasNext()) { sb.append(SEP); } } sb.append(CLOSE); return sb.toString(); } }
public boolean contains(Marker other) { if (other == null) { throw new IllegalArgumentException("Other cannot be null"); } if (this.equals(other)) { return true; } if (hasReferences()) { for (Marker ref : referenceList) { if (ref.contains(other)) { return true; } } } return false; }
public synchronized void add(Marker reference) { if (reference == null) { throw new IllegalArgumentException("A null value cannot be added to a Marker as reference."); } // no point in adding the reference multiple times if (this.contains(reference)) { return; } else if (reference.contains(this)) { // avoid recursion // a potential reference should not its future "parent" as a reference return; } else { // let's add the reference if (referenceList == null) { referenceList = new Vector<Marker>(); } referenceList.add(reference); } }
/** * This method is mainly used with Expression Evaluators. */ public boolean contains(String name) { if (name == null) { throw new IllegalArgumentException("Other cannot be null"); } if (this.name.equals(name)) { return true; } if (hasReferences()) { for (int i = 0; i < refereceList.size(); i++) { Marker ref = (Marker) refereceList.get(i); if (ref.contains(name)) { return true; } } } return false; }
public Marker getDetachedMarker(String name) { return new BasicMarker(name); }
public boolean hasChildren() { return hasReferences(); }
public String toString() { if (!this.hasReferences()) { return this.getName(); } Iterator<Marker> it = this.iterator(); Marker reference; StringBuilder sb = new StringBuilder(this.getName()); sb.append(' ').append(OPEN); while (it.hasNext()) { reference = it.next(); sb.append(reference.getName()); if (it.hasNext()) { sb.append(SEP); } } sb.append(CLOSE); return sb.toString(); } }
public boolean contains(Marker other) { if (other == null) { throw new IllegalArgumentException("Other cannot be null"); } if (this.equals(other)) { return true; } if (hasReferences()) { for (int i = 0; i < refereceList.size(); i++) { Marker ref = (Marker) refereceList.get(i); if (ref.contains(other)) { return true; } } } return false; }
public synchronized void add(Marker reference) { if (reference == null) { throw new IllegalArgumentException( "A null value cannot be added to a Marker as reference."); } // no point in adding the reference multiple times if (this.contains(reference)) { return; } else if (reference.contains(this)) { // avoid recursion // a potential reference should not its future "parent" as a reference return; } else { // let's add the reference if (refereceList == null) { refereceList = new Vector(); } refereceList.add(reference); } }
/** * Manufacture a {@link BasicMarker} instance by name. If the instance has been * created earlier, return the previously created instance. * * @param name the name of the marker to be created * @return a Marker instance */ public Marker getMarker(String name) { if (name == null) { throw new IllegalArgumentException("Marker name cannot be null"); } Marker marker = markerMap.get(name); if (marker == null) { marker = new BasicMarker(name); Marker oldMarker = markerMap.putIfAbsent(name, marker); if (oldMarker != null) { marker = oldMarker; } } return marker; }
public boolean hasChildren() { return hasReferences(); }