001package votorola.a.trust; // Copyright 2008, 2010-2011, Michael Allan.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE.
002
003import votorola.a.voter.*;
004import votorola.g.lang.*;
005
006
007/** A null implementation of a node in a compiled network trace.
008  */
009public @ThreadSafe final class TraceNode0 implements TraceNode
010{
011
012    private static final long serialVersionUID = 0L;
013
014
015
016    /** Creates a TraceNode0.
017      */
018    public TraceNode0( IDPair _registrant )
019    {
020        if( _registrant == null ) throw new NullPointerException(); // fail fast
021
022        registrant = _registrant;
023    }
024
025
026
027   // - T r a c e - N o d e --------------------------------------------------------------
028
029
030    /** @return null
031      */
032    public String getArea() { return null; }
033
034
035
036    /** @return null
037      */
038    public String getCountryCode() { return null; }
039
040
041
042    /** @return null
043      */
044    public String getGeohandle() { return null; }
045
046
047
048    /** @return null
049      */
050    public String getOtherProperties() { return null; }
051
052
053
054    /** @return zero
055      */
056    public int primaryTrustEdgeCount() { return 0; }
057
058
059
060    public IDPair registrant() { return registrant; }
061
062
063        private final IDPair registrant;
064
065
066
067    /** @return zero
068      */
069    public int trustLevel() { return 0; }
070
071
072
073   // - O b j e c t ----------------------------------------------------------------------
074
075
076    /** Returns the registrant's username.
077      */
078    public @Override final String toString() { return registrant.username(); }
079
080
081
082}