001package votorola.s.gwt.scene.feed; // Copyright 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 003 004/** A person as formalized in a bite feed. Not all properties are necessarily backed by 005 * actual values, as explained in {@linkplain Bite Bite}. 006 */ 007public interface Person 008{ 009 010 011 /** This person's dart sector as last assigned by a count. 012 * 013 * @return a dart sector of 1 to {@value 014 * votorola.a.count.CountNode#DART_SECTOR_MAX}, or zero if no dart 015 * sector is assigned, or -1 if the assignment is unknown. 016 * 017 * @see votorola.a.count.CountNode#dartSector() 018 */ 019 public byte dartSector(); 020 021 022 023 /** This person's primary residence. 024 * 025 * @return the residence, or null if none is recorded in the bite. 026 */ 027 public Residence residence(); 028 029 030 031 /** This person's username. 032 * 033 * @see votorola.a.voter.IDPair#username() 034 * 035 * @return the username, or null if none is recorded in the bite. 036 */ 037 public String username(); 038 039 040 041 /** This person's vote trace according to the results of last count, exclusive of any 042 * subsequent user input. The trace lists the person (index 0) followed by each 043 * candidate who receives the person's vote, in order of receipt. If the length of 044 * the trace is 1, then the vote is not received by any candidate; either because the 045 * person is not voting or because the vote is barred. 046 * 047 * @return an ordered collection of Persons, the form of the collection depending 048 * on the implementation; or null if the vote trace is unknown. An unknown 049 * trace may be caused by an unmounted or unreported count on the vote server, 050 * or a bug on the server side of the bite feed. 051 * 052 * @see votorola.a.count.CountNodeW#trace() 053 */ 054 public Object voteTrace(); 055 056 057 058 /** An external trace projected from the voteTrace by including any subsequent input 059 * from the user's (but not of other users); or null if the original vote trace is 060 * unknown (null), or the user had no subsequent input. 061 * 062 * @return an ordered collection of Persons, the form of the collection depending 063 * on the implementation; or null. 064 * 065 * @see votorola.a.count.CountNodeW#trace() 066 */ 067 public Object voteTraceProjected(); 068 069 070 071}